We've been having some trouble with a server that's had automatic updates enabled on it. This past Monday, it seems that a new kernel was installed, and after rebooting our MySQL server started behaving like its file limit had been exceeded. I check the mysql user's ulimit -n
output, and sure enough it's set to 1024.
I try to change this in /etc/security/limits.conf like so:
mysql soft nofile 20000
mysql hard nofile 25000
then when I try to check the user's ulimit again, it's still set to 1024. Rebooting hasn't had any effect either. It's like this file isn't being read at all.
Also, setting the ulimit manually does work.
Kernel version is 3.13.0-37-generic
It turned out this was an error in the MySQL configuration. The variable
open_files_limit
was in the wrong section of /etc/mysql/my.cnf, and wouldn't load.