1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 OOM errors

Discussion in 'Troubleshooting and Problems' started by imthebest, Feb 20, 2015.

  1. imthebest

    imthebest Formerly Super120

    Hi,

    I'm using XF 1.4.5, XFES 1.1.2 and XFMG 1.0.3

    I have been using a memory_limit of 256MB in php.ini since I was having a problem dealing with the report system (previously I was using 128MB without issues). Today I switched back to reports on a forum instead of using the report system, so then I went ahead and edited the memory_limit back to 128MB, restarted Apache, try to load my forum (the index page) and got a blank page and this on my php.log:

    Code:
    [20-Feb-2015 16:31:06 UTC] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4104 bytes) in /var/www/html/library/XenForo/Link.php on line 9$
    [20-Feb-2015 16:31:09 UTC] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 65552 bytes) in /var/www/html/library/XenForo/Link.php on line $
    So then I increased from 128MB to 160MB and now the problem is another file:

    Code:
    [20-Feb-2015 16:32:50 UTC] PHP Fatal error:  Allowed memory size of 167772160 bytes exhausted (tried to allocate 82 bytes) in /var/www/html/library/XenForo/Model/Report.php on $
    [20-Feb-2015 16:33:25 UTC] PHP Fatal error:  Allowed memory size of 167772160 bytes exhausted (tried to allocate 82 bytes) in /var/www/html/library/XenForo/Model/Report.php on $
    [20-Feb-2015 16:33:32 UTC] PHP Fatal error:  Allowed memory size of 167772160 bytes exhausted (tried to allocate 92 bytes) in /var/www/html/library/XenForo/Model/Report.php on $
    I have had to increase it again to 256MB in order to "boot" my forum which is a big board.

    Is it normal for XenForo to require a memory_limit of 256MB?

    Thanks,
    Super120
     
  2. imthebest

    imthebest Formerly Super120

    My XenForo pages are no where using anything around more than 15MB to load... it looks like the problem happens only when "booting" my forum. These are the steps I followed the reproduce the problem:

    1. Close the forum.
    2. Edit php.ini and lower memory_limit from 256MB to 128MB.
    3. Restart Apache to apply the changes on php.ini
    4. Load the forum (the forum list): I get a blank page and the OOM error logged in php.log
     
  3. imthebest

    imthebest Formerly Super120

    The OOM in Link.php is maybe related to the fact that I have 58 active route filters?
     
  4. Mike

    Mike XenForo Developer Staff Member

    If you still have the 1000s of open reports, they are still actually calculated and considered even if you send reports to a forum. They link is hidden by default in the UI but it's still accessible.

    You should close the reports.
     
  5. imthebest

    imthebest Formerly Super120

    Could you please provide a query to close all the active reports in the report system? I have around 6,000.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    UPDATE xf_report SET report_state = 'resolved';
    Should do it.
     
  7. imthebest

    imthebest Formerly Super120

    That query will overwrite (re-close) all the current closed reports?

    Isn't a WHERE needed?
     
  8. imthebest

    imthebest Formerly Super120

    And... that query isn't going to sent mass alerts to all the reporters stating that their "report has been resolved", right?

    I don't want to generate those alerts.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    UPDATE xf_report SET report_state = 'resolved' WHERE report_state = 'open';
     
  10. imthebest

    imthebest Formerly Super120

    Thank you very much @Brogan

    One last question please:

    If you are unsure could you please ask one of the devs? Thanks!
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    No alerts will be generated.

    And I was able to answer that all on my own...
     
    Dan, Amaury and imthebest like this.

Share This Page