Now a SS3 site is experiencing similar issues:
- [Error] Couldn't connect to MySQL database | User mysite_user already has more than 'max_user_connections' active connections
- [Warning] mysqli::mysqli() [mysqli.mysqli]: (42000/1203): User mysite_user already has more than 'max_user_connections' active connections
The account / DB has a max_user_connection limit of 30 and at the time of the error being thrown, the server access logs and analytics data shows only 1 active user, with a few minutes separating the previous request/access to the site. So clearly it isn't an issue with the server being overloaded with traffic or connections.
When I query the database when the site is idle (confirmed via Analytics & Access Logs) here are some relevant results:
show status like '%onn%'; Variable_name Value Aborted_connects 12352 Connections 6013446 Max_used_connections 53 Ssl_client_connects 0 Ssl_connect_renegotiates 0 Ssl_finished_connects 0 Threads_connected 8
What's weird is that there is always a minimum of 8 Threads_connected - is this normal? When I try to simulate traffic (normal site access, site admin, site blog) the highest I see Threads_connected get is around 14.
What typically is the max_user_connections used by other hosts running SilverStripe sites? 30 seems generous!
Any suggestions to investigate further?