We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12410
    • 353 Posts
    Hi All,
    My error logs and sessions table gets massive under time and I was wondering is there a way to prune or empty the logs automatically every week or so?
    I get some dubious "errors" being logged which on Googling are generated by a bug in the extra or similar. I don't want my sessions table or error.log growing to xGB.
    Any solutions?
    Thanks


    apache2, revo 257, ubuntu 16, php7, mysql5


    [2017-08-08 09:45:58] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__src57c39d5f19ce335bbba4039ea762c9a2_parfe75230c38c1dd77cfb659e43ae25583_dat1448272174.jpeg
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
    OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__srcc1f06291aee0acbfe5f4143cce65573a_parfe75230c38c1dd77cfb659e43ae25583_dat1448272556.jpeg
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
    OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 121) phpThumb was unable to generate a thumbnail for: /var/www/html/mydomain.com/public_html/bhr/core/cache/phpthumb/mydomain.com__src629ee8f360bf17f9d0f61ed99b636f92_parfe75230c38c1dd77cfb659e43ae25583_dat1448284996.jpeg
    [2017-08-08 09:46:00] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/model/phpthumb/modphpthumb.class.php : 133) Error outputting thumbnail:
    OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 618
    [2017-08-08 09:48:27] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.
    [2017-08-08 09:52:17] (ERROR @ /var/www/html/mydomain.com/public_html/bhr/core/cache/includes/elements/modsnippet/131.include.cache.php : 69) [migxResourceMediaPath]: docid could not be determined.

      • 44195
      • 293 Posts
      Those errors look like you've got some broken paths/links there. Are your migx tvs displaying correctly?

      As for the session table, there's actually meant to be garbage collection but it sounds like that's not working?
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
        • 3749
        • 24,544 Posts
        The [url=https://bobsguides.com/blog.html/2015/08/22/taming-the-modx-revolution-error-log/[/url] extra won't automatically truncate the error log for you, but it will make the log viewable no matter how big it gets, show it in a popup window, and display an alert symbol when the log is not empty.

        Most of your recurring errors should be fixed, though.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting