Here is the problem
SQLSTATE[HY000] [1135] 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
"Obviously" this means you need to raise the ulimit for the process running mysql. I say "obviously" because this error means different things. In most cases it means that the server ran out of memory. perror 11 says OS error code 11: Resource temporarily unavailable, yet when there is enough memory there may be a pam_limit issue. In my case there is.
So I did the following
in /etc/security/limits.conf I added this
mysql soft nofile 10240 mysql hard nofile 1537454 mysql soft nproc 32768 mysql hard nproc 65535
yet when I test the changes su - mysql
I get
su: pam_limits(su-l:session): Could not set limit for 'nofile': Operation not permitted
So my next course of action is to check
/etc/pam.d/system-auth
wait a second it has
session required pam_limits.so
and /etc/pam.d/su calls session include system-auththus I don't need to add session required pam_limits.so
Now the game of Stump the Murph begins:
In about 1/2 hour Murph figured out the solution! He deduced that since
cat /proc/sys/fs/file-max
1537454
you can't set the hard limit of nofile to 1537454 because in theory you could starve the kernel from file descriptors thus from murph's suggestion I did
mysql soft nofile 10240
mysql hard nofile 768727 mysql soft nproc 32768 mysql hard nproc 65535
#MAKE SURE root has the same or greater settings!!!
root soft nofile 10240root hard nofile 768727 root soft nproc 32768 root hard nproc 65535
Thanks Murph!
No comments:
Post a Comment