We have a CentOS 6.5 server we use for development with a simple LAMP stack. At any time there is a maximum of 4 developers working on the machine, mostly via samba, running PHP web sites. We have Percona Server 5.6 installed.
Every so often the dev server becomes unresponsive, but found it was actually MySQL connections - so web sites wouldn’t load where there were database connections. In the error log we see this kind of pattern just before it dies:
2017-03-29 15:00:13 57636 [ERROR] /usr/sbin/mysqld: Can’t open file: ‘./schema_name/table_name.frm’ (errno: 24 - Too many open files)
(lots of the above)…(then several of the below)…
2017-03-29 15:00:14 57636 [ERROR] Error in accept: Too many open files
The system gets more and more sluggish until I restart the mysql service.
What’s the best way to figure out why this is happening? From what I’ve seen in searching it could be to do with the open file limits, but with our low number of users should that make a difference?