• Resolved Lusmo

    (@vincentchow)


    Whenever I visit Jetpack’s dashboard, two things happen:

    1. The Site Stats would not load. Javascript console on my browser shows multiple lines of:

    [Error] Failed to load resource: the server responded with a status of 500 () (index.php, line 0)

    2. The following error will be logged in my debug log, causing “error establishing a database connection” for several seconds.

    PHP Warning: mysqli_real_connect(): (HY000/1226): User 'mydatabaseusername' has exceeded the 'max_user_connections' resource (current value: 15)

    I’m running a WooCommerce website with Litespeed Cache plugin installed on Hostinger shared hosting.

    What I have done:

    1. Created a staging site and disabled all plugins except Jetpack.
    2. Changed the theme to Twenty Twenty One (default)
    3. Replicate the error by visiting Jetpack’s dashboard, and the error persist (same errors logged in debug log).
    4. Activated Query Monitor to check the queries initiated. Do not see any queries from deactivated plugins, most queries are from Jetpack.

    I have also logged in to phpMyadmin, reload the Jetpack dashboard page, and quickly run “show processlist”. I see 15 (max user connections set by my web host) lines of process, all of them in “Sleep” state. They are gone in a couple of seconds.

    On my Live WooCommerce site, “max_user_connections” errors occur intermittently throughout the day when there’s activities, sometimes right after someone made an order, but not every single time. I am also using the WooCommerce iOS app (hence the need of Jetpack) if that’s relevant.

    I also see occasional instance of “WordPress database error Commands out of sync” being logged on my Live website, but not on the staging site.

    Any guidance is much appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Animesh Gaurav (a11n)

    (@bizanimesh)

    Hi there,

    The error you’re getting is stating the issue: your MySQL server is only allowing 15 connections per user, and that limit has been reached.

    More info: https://stackoverflow.com/a/9391741

    For this issue, you should ask your hosting service to increase the number of connections allowed for your account and then check again.

    Thread Starter Lusmo

    (@vincentchow)

    Is 15 connections per user insufficient to run Jetpack and to view the dashboard site stats even when no other plugins are active? I get the same error in the debug log when using the WooCommerce iOS app and it’s unable to load orders (intermittent).

    I was under the impression that 15 max_user_connections wouldn’t cause issues because my WooCommerce site only receive less than 100 visitors a day with less than 10 orders placed daily. Moreover, I am facing the same issue on my staging site with zero activities, it reaches max user connection just by me loading Jetpack’s dashboard and that’s really peculiar.

    I am willing to upgrade my hosting plan if it’s confirmed that the issue is really just about a lack of resources rather than a bug with Jetpack or a plugin conflict or just a badly coded program somewhere. Would appreciate an opinion on this.

    Plugin Support MadHatter (a11n)

    (@madhattersez)

    Hi, there.

    Yes, Jetpack and WooCommerce plugins can definitely breach such a small max_user_connections setting. A connection in this sense doesn’t necessarily mean a connection by a single user at any given time – a connection can be a single process, and plugins often use several processes at once, or in rapid succession, to operate.

    I’m not sure if you’ll need to get your hosting upgraded. Depending on the host, they may increase this setting for you just by asking (and I sincerely hope they do)!

    Thread Starter Lusmo

    (@vincentchow)

    Thanks for the response. Any idea why the Site Stats wouldn’t load and output a Error 500 in my browser’s Javascript console? I have other WordPress installations with the same host and the site stats seem to load fine. Also, oddly, the other sites also doesn’t cause a max_user_connections error when loading the Jetpack dashboard.

    Anonymous User 18700194

    (@anonymized-18700194)

    Hi there –

    Without knowing the specific sites in question, my sense would be that this is due to the unique attributes of each individual site. For example, they might be running different plugins, themes, or widgets. Additionally, it may be that they are hosted on different servers within your host’s network.

    That said, I would recommend reaching out to your host about the MySQL issue as they will be able to provide more insight into the exact cause.

    Anonymous User 18700194

    (@anonymized-18700194)

    Hi there,

    It has been more than one week since we have heard from you, so I’m marking this topic as resolved.

    But If you have any further questions or need some more help, you’re welcome to reply here or open another thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Exceeded max_user_connections when viewing Jetpack Dashboard’ is closed to new replies.