We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19153
    • 53 Posts
    Hi All

    My site and all my other sites on shared hosting have been taken down due to an up-to-date modx revolution site causing excessive performance problems!

    They have allowed me to look at the error logs and not being very technical i'm not sure what is happening here.

    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - 
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - 
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - 
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'sending authentication information', system error: 32
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'sending authentication information', system error: 32
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - 
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
    [2012-09-15 08:24:33] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - 
    [2012-09-15 08:24:33] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'sending authentication information', system error: 32


    There is literally hundreds of entries on the same day for this error.

    One thing I considered is that the site uses the snippet Rowboat to query a database, could this be a problem with rowboat?

    Any help would be great so i can get my site back online!

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That could indeed be your problem. The errors are all indicating that you have too many queries going on, more than you are allowed. The listing snippets like Wayfinder, getResources and Rowboat are heavy on the database access. You will either need to re-think your basic site design or change to a host that is not so limiting.
        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
        • 19153
        • 53 Posts
        Thanks Susan

        Any reason you can think that this would happen yesterday and not before? There was no more traffic than usual and from what I can see there has not been a problem before.

        I may have to disable rowboat but unfortunately the site is based around that snippet....
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah, somehow I got the impression that you had just installed Rowboat. In this case, it sounds like the hosting company made some changes to their policies. Either that, or something else altogether is going on. See if you can get the server access logs to see what pages are being requested at the same time.
            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
            • 19153
            • 53 Posts
            No its been running a long time, I don't think anything has changed on the hosting side, it does seem as this error occurred on the 15th for the first time and has not happened previously or since.

            I just spotted another part of the error about their being a duplicate entry which I can only think is possibly causing rowboat to max out?

            [2012-09-15 08:01:22] (ERROR @ /index.php) Error 23000 executing statement:
            INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('05qvknm4pp0h6tnjn4t3r5gpm6', 1347717682, 'modx.user.contextTokens|a:0:{}')
            Array
            (
                [0] => 23000
                [1] => 1062
                [2] => Duplicate entry '05qvknm4pp0h6tnjn4t3r5gpm6' for key 'PRIMARY'
            )
            
            [2012-09-15 08:01:22] (ERROR in xPDOConnection::connect @ /home2/messedu1/public_html/outletseekernew/core/xpdo/xpdo.class.php : 2955) SQLSTATE[42000] [1203] User messedu1_mod16 already has more than 'max_user_connections' active connections
            [2012-09-15 08:01:22] (ERROR @ /index.php) Error 23000 executing statement:
            INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('05qvknm4pp0h6tnjn4t3r5gpm6', 1347717682, 'modx.user.contextTokens|a:0:{}')
            Array
            (
                [0] => 23000
                [1] => 1062
                [2] => Duplicate entry '05qvknm4pp0h6tnjn4t3r5gpm6' for key 'PRIMARY'
            )
            
            [2012-09-15 08:01:22] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `modx_session` AS `modSession` WHERE `modSession`.`id` = ?  - Array
            (
                [0] => 00000
            )


            I will try and see if i can get access to any logs but still confused here!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ah. Sessions in Revo are stored in the database. The plot thickens!
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Ok, looking more closely (dratted eyes!) I see those errors were all for attempts to use the session storage. So I don't think Rowboat was your problem at all.

                You say "all my other sites"? Why would your hosting shut down all of your sites, if one of them was being problematical (for whatever reason)?
                  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
                  • 19153
                  • 53 Posts
                  Ok great I won't disable rowboat then for now but I don't know much about session storage!

                  Yes its a problem with my shared hosting that I am now aware of: if one site causes a problem they take them all offline....

                  They have however allowed me to password protect this site folder so that nobody can access it and then put my other sites back up.

                  I would like to tell them i have solved the problem though for this site or they will make me remove it from their hosting!
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    You could use the hosting conrol panel's phpMyAdmin to clear the modx_session table (truncate table). That would eliminate the existing problem of duplicate entries.

                    But why it got into that state in the first place is another question.
                      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
                      • 34004
                      • 125 Posts
                      I would try a couple of things to make your site more efficient

                      • make sure all your calles are cached
                      • using http://modx.com/extras/package/getcache will make a MASSIVE difference. Cache your rowboat calls for an hour or so, will cut down massively on DB requests.
                      • get a better shared host, sounds like they limit mysql connections so maybe the limit is too low?

                      give getcache a go on your most intensive rowboat call. I bet it will help.