Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

max_user_connections limit being hit on SS3 site but only 1-2 simultaneous users at time of error

Go to End



Community Member, 166 Posts

2 October 2012 at 1:38am

Edited: 02/10/2012 1:56am


A few SS2.4 sites were periodically experiencing max_user_connections exceeded error.

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?

Thank you.