mysql not starting – errno: 24 – Too many open files

This was a really strange one and might be peculiar to debian servers. I was trying to change a couple of mysql default settings, so after editing the config file, I restarted mysql on a webserver and it didn't come back up again. There were a bunch of errors in the /var/log/mysql.log saying "errno: 24 – Too many open files". And in fact mysql was so busy pumping these errors out, that it didn't have time to do any databasing on the files it was able to open.

After a bit of experimentation (read 'panic'), I discovered that rebooting the server started mysql up fine, but doing a 'service mysql restart' produced the file errors, so I rebooted and left it running while I investigated.

Read more