Jump to:

23576 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » max_user_connections limit being hit on SS3 site but only 1-2 simultaneous users at time of error

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

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

Page: 1
Go to End
Author Topic: 421 Views
  • vwd
    Avatar
    Community Member
    158 Posts

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

    Hi,

    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
      /home/mysite/public_html/framework/model/MySQLDatabase.php:568
    • [Warning] mysqli::mysqli() [mysqli.mysqli]: (42000/1203): User mysite_user already has more than 'max_user_connections' active connections
      /home/mysite/public_html/framework/model/MySQLDatabase.php:57

    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.
    VWD.

    421 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.