MySQL/max open files
来自康健生活
< MySQL
error
[Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 15000)
ulimit
ulimit -a
core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 1806 max locked memory (kbytes, -l) 16384 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 1806 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
看到该用户的最大打开文件数为1024个,而mysql服务需要打开15000个,所以出现了上述的警告。
vi /etc/security/limits.conf
root hard nofile 65535 mysql soft nofile 65535 mysql hard no file 65535
ulimit -n 65535
No categories