I'm getting this error messages SQLSTATE[08004] [1040] Too many connections
, I'm using pdo adapter. Do I need to close connection? And how I do that?
What this means in practical terms is that a MySQL instance has reached its maximum allowable limit for client connections. Until connections are closed, no new connection will be accepted by the server.
This means that the maximum number of clients that may be connected to the server has been reached. Either the client will have to wait for another client to log off, or the administrator will have to increase the maximum number of connections allowed.
In your my.conf file (usually located in /etc) find the line that says:
[mysqld]
And somewhere below that set
max_connections=500
Or whatever numeric value you need.
More information here: MySQL 5.5 Reference Manual: Too many connections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With