We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7391
    • 49 Posts
    I've been having problems for weeks now with my site having too many idle connections to the mySQL server. My site goes down and displays the following error message:
    "User greatbayvillas already has more than 'max_user_connections' active connections" See attached screenshot.

    This is because the content mangement system uses persistant connections (mysql_pconnect) in some of it's code.

    I asked my hosting company, Brinkster (they suck), to decrease the wait_timeout variable from 600sec to 60sec and this was their response:

    Hello,
    Thank you for contacting Brinkster regarding your account. We have adjusted the wait_timeout to 600 seconds to kill idle threads and this has been running for a few months on our system now. As a shared hosting server, adjusting the value to 60 seconds would be very aggressive and likely cause issues with other customers. As well, increasing the Max_user_connections would not be an option as that would add additional server load to the server, moreover, most sites would not require more than 15 concurrent connections to MySQL if things are coded correctly and connections are closed correctly.
    You are correct in assuming you are using persistent connections and that is where the issue here is. Most CMS applications allow you to turn off persistent connections in favor of mysql_connect() which would be our best suggestion.

    So can anyone tell me if there is an option in Evo (1.05+) to turn persistant connections off?

    Or if not, will upgrading to Revo solve this issue?

    Thanks guys
      • 3349
      • 126 Posts
      Hi All

      Has there been any reponse/resolve on this issue? Im having the same problems with my max_user_connections because the web user login (members area) uses the mysql_pconnect function which opens a persistent connection.

      Looking for alternatives or the ability to turn off persistant connections

      Thanks
        • 3349
        • 126 Posts
        Hi All

        Has there been any response/resolve on this issue? Im having the same problems with my max_user_connections because the web user login (members area) uses the mysql_pconnect function which opens a persistent connection.

        Looking for alternatives or the ability to turn off persistant connections

        Thanks
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          What snippet are you using for web login?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 7391
            • 49 Posts
            Hey bigSlim,

            The only way i was able to fix this issue was by upgrading to Revo. Revo does not use the mysql_pconnect.

            @scottwell the site that had this problem didnt even have any fancy user login system or anything like that.. just a bunch of resources. The site did get around 15,000 hits a day so that may have been why it became an issue.

            Hope this helps.
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Hello,

              I know it's a little late (I was sure I had responded before), but it defiantly sounds like you are hitting your resource usage wall. If you are still using shared hosting this can be common with higher traffic sites, granted 15,000 hits a day isn't all that much considering a database connection/query is usually under 5ms.

              You may need to look at stepping up your hosting in the near future.
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 7391
                • 49 Posts
                @AMDbuilder.. you might be right.. however.. all i did was upgrade to revo and ive not had that problem since.. they still get around the same amount of hits per day and i havent upgraded/changed anything with hosting.

                So idk. :-/.. it was a nightmare to deal with, i remember trying everything and reading EVERY forum post that had anything (even remotely) to do with what i was going through. To the point where it was less painfull to just spend hours and hours manually converting each resource from evo to revo (since there's no upgrade tool yet). But i'm happy that's over with.

                Good luck BigSlim