We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25819
    • 10 Posts
    We backup the database every day, but every three or four days, the Backup Manager fails. The error message is
    Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 97 bytes) in [modx_root]/manager/actions/static/bkmanager.static.action.php on line 312

    I can’t find anything special on that line. However, if I delete all entries from table modx_manager_log, and/or table modx_log_access, the Backup Manager would just work fine. Seems like when the sizes of those two tables are too big (more than 100K), the error above will be generated.

    I wonder if someone can tell me how to change the memory setting, or how to manage those logs easily?

      • 33337
      • 3,975 Posts
      @ Memory: Its a server issue, this message indicates that when you run the backup script, you use more memory than alloted.

      @ Log tables: These tables are space-eaters laugh ...

      Solution: Actually, I guess, the problem lies with Log Tables, so you can turn-off built-in logging and use a 3rd party solution to track all of your pageviews etc. You can read on integrating SlimStat with MODx, which is a very good piece of software IMO.

      NOTE: If you need to keep the size of MODx database low, you should use separate DB for SlimStat.

      "I could be wrong" laugh

      I hope this will help you.

      regards,

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
      • My guess is that the script is running close to the memory limit anyway and the log tables are pushing it over the edge.

        If you have access to the php.ini, look for the ’memory_limit’ setting and try upping it to 16M and see if that makes a difference, otherwise you could try setting this in the backup script:

        ini_set("memory_limit","16M");

        And I’d agree with Zi, if you can, disable logging and go with Slimstat - it’s much nicer smiley

        Hope that helps, Garry
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 25819
          • 10 Posts
          Thanks, guys. Both of your solutions sound very good. I will try both of them and see how it goes.