I use MySQL and PHP with 2 application servers and 1 database server. With the increase in the number of users (about 1000 by now), I get the following error:
SQLSTATE[08004] [1040] Too many connections
The parameter is max_connectionsset to 1000in my.cnf, and mysql.max_persistentset to -1in php.ini.
No more than 1,500 apache processes are running, since the MaxClientsapache parameter is 750, and we have 2 application servers.
- Should I raise
max_connectionsto 1500 as indicated here ? - Or do I need to set
mysql.max_persistentto 750 (we use PDO with constant connections for performance reasons, since the database server does not match the application servers)? - Or do I need to try something else?
Thanks in advance!
source
share