We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25737
    • 62 Posts
    I first got this email from my hosting provider:

    Hi Marko,
    The MySQL server was overloaded and crashed today, on further checking we found that you domain "supplement-analysis.com" - utilizes the maximum resources. Lots of queries coming from that domain to MySQL services. Please check this domain and update us ASAP.
    Best regards,
    Support
    CleverDot.com

    Next, my site went down and I can no longer access the manager section of the site.

    The error logs show this over and over: [Tue Jan 13 01:10:46 2009] [error] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13137123 bytes) in /usr/home/suppl900/public_html/manager/includes/document.parser.class.inc.php on line 1296

    Can someone please help? I have no idea what the issue is and I am not a DB or PHP expert. I’ve had this site for over 2 years and it has over 200 pages of content, I cannot afford to loose this site.

    Thank you!
      Faithfully using MODx since 2007!
      • 26903
      • 1,336 Posts
      Assuming 0.9.6.1/2 here it looks as though you may have exhausted you’re event log, the code is failing to insert an event into the log.

      Log into the manager and try clearing this.

      I believe from other postings that PHX can sometimes generate lots of events depending on how its configured, if you’re using this check its settings.
        Use MODx, or the cat gets it!
        • 7253
        • 97 Posts
        If you can’t access the MODx manager, you should access your site’s control panel (normally provided by your host) and have a look at your database that way. They often provide access via PHPMyAdmin, or some other web-based DB front-end.

        You should have a look at the tableprefix_manager_log and tableprefix_event_log tables. Check to see how many rows are in these tables. If it’s excessive (say, more than 5000 rows?), you might like to empty these tables and see if that helps. (Replace tableprefix_ with your sites actual table prefix)

        In PHPMyAdmin, when you select the database from the list, you’ll be shown a list of tables - look at the Records column. Clicking on a table in the list on the left will show you that table, and allow you to Empty it.

        Let us know how you get on!
          • 25663 MODX Staff
          • 12,272 Posts
          My suspicion is that you’re running a version that started prior to 0.9.6 and have the Template Switcher plugin installed. That needs to be deleted too as it registers a ton of errors in the error logs typically.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 25737
            • 62 Posts
            I logged into phpmyadmin and clicked on the tables and got this error:

            Error

            SQL query: Edit

            SHOW INDEX FROM `modx_manager_log` ;

            MySQL said: Documentation
            #1017 - Can’t find file: ’./suppl900_cms/modx_manager_log.frm’ (errno: 13)

            I really really hope this doesnt mean I lost all my content...
              Faithfully using MODx since 2007!
              • 7253
              • 97 Posts
              Hopefully you haven’t lost it, but that error isn’t a very good sign. However, all is not lost - lets see if we can sort this out.

              First of all, lets try to take a backup of the database.

              In phpmyadmin, select the database from the list, then click the Export tab. Click ’Select All’ at the top, then make sure that ’Add DROP TABLE / VIEW / PROCEDURE / FUNCTION’ is ticked (in Structure) and ’Save as File’ are ticked (at the bottom). Then click ’Go’. Hopefully this will download a .sql file which is a database backup. This file can be restored into a new MySQL database locally to test it out. Instructions for doing this are available on my site here: http://www.codeistry.com/help/uploading-downloading-and-backing-up-modx-sites

              Next thing to do would be to attempt to repair the offending tables. If you click on the Structure tab at the top of phpmyadmin, then tick the tables you want to repair, there’s a dropdown list at the very bottom called ’With selected:’ - pick repair from this list and see what happens. Just do one table at a time, starting with the smallest *_log table and let us know what happens.

              If they repair successfully, do another backup, then try logging into MODx manager again.

              Just out of interest, how many records does phpmyadmin say there are in your *_log tables?
                • 26903
                • 1,336 Posts
                Check your admins haven’t taken your DB offline.

                I’m not sure a backup will work here, it may choke on this error but try it.

                The rest of your content is probably still OK, it definitely seems to be this table, you need somehow to empty it or as suggested repair it. You could select all the other tables one by one and export them as a manual backup if in doubt.

                Presumably you have a nightly backup to start from if things go wrong here, so you will only lose a few hours of data, not the lot, not good but better than nothing.
                  Use MODx, or the cat gets it!
                  • 25737
                  • 62 Posts
                  I think the hosting company took it offline because when I went back to it right now, it was there...

                  Event Log shows this:

                  Showing rows 0 - 29 (259,876 total, Query took 0.0433 sec)
                  SQL query:
                  SELECT COUNT( * ) AS `Rows` , `id`
                  FROM `modx_event_log`
                  GROUP BY `id`
                  ORDER BY `id`
                  LIMIT 0 , 30

                  Manager Log:

                  Showing rows 0 - 29 (7,154 total, Query took 0.0220 sec)
                  SQL query:
                  SELECT COUNT( * ) AS `Rows` , `id`
                  FROM `modx_manager_log`
                  GROUP BY `id`
                  ORDER BY `id`
                  LIMIT 0 , 30

                  Before I move forward, I want to make sure I am suppose to empty these out? I couldnt find the repair drop down... Please excuse my ignorance, im a mysql noob.

                  Thanks for all the help everyone.
                    Faithfully using MODx since 2007!
                    • 7253
                    • 97 Posts
                    Yes, your event log table has 250,000+ rows in it - this is probably causing the problems.

                    Do a full backup, as above, then empty these two tables (just *_manager_log & *_event_log), then do another backup, then try MODx again.

                    Let us know how you get on.
                      • 25737
                      • 62 Posts
                      That worked! The site seems to be running way faster then before. Do I need to do anything else? Removing a plugin?? Thanks for all the help!
                        Faithfully using MODx since 2007!