我有一个运行Percona Xtradb服务器的数据库服务器和5个从服务器.我总是得到错误
mysql error: Can’t create a new thread (errno 11); if you are not out
of available memory, you can consult the manual for a possible
OS-dependent bug
虽然我设定了极端
root@master:~# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2062915
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1000000
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) 1000000
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
root@master:~# cat /proc/`pidof mysqld`/limits | egrep "(processes|files)"Max processes 1000000 1000000 processes
Max open files 1000000 1000000 files
我真的不知道发生了什么事?请帮我.
解决方法:
在/etc/security/limits.conf中添加这样的行
mysql soft nproc 4096
然后重启mysql