A few [url=http://www.silverstripe.org/general-questions/show/20593]SS2.4 sites were periodically experiencing max_user_connections exceeded error[/url].
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%';
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?