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

Not a Bug Memory exhausted

Discussion in 'Resolved Bug Reports' started by Floren, Mar 26, 2012.

  1. Floren

    Floren Well-Known Member

    Not sure if this is considered a bug, or something related to Zend memory usage.
    I get this all the time in my server logs:
    I previously had the memory_limit set to 32M (IMO that is a huge value) and I increased now the value to 64M, just to be safe. What values do you recommend? I'm used to have in vBulletin values like 4-8MB. Thanks for your help.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Not a bug. Just a low memory_limit.

    XenForo tries to set the memory_limit to at least 128M at runtime. In your case the error indicates that the memory_limit is still at 32M which means XF can't increase the limit, so you need to increase it on the server.
     
    mrGTB and CyclingTribe like this.
  3. Floren

    Floren Well-Known Member

    Thanks Jake, so what is the recommended memory_limit for Xenforo? 128MB? 256MB?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    128MB or higher. XF will try to increase the limit to 128MB at runtime if it is set lower than that.
     
  5. Floren

    Floren Well-Known Member

    Well, my question is: will it be beneficial to use more than 128MB? I have it set to that value now.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    No.
     
  7. Marcus

    Marcus Well-Known Member

    I set the memory limit to 32M on my server within php.ini. I don't want that limit to be increased. How does xenforo tries to increase the limit?
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    32M is ridiculously low.

    It tries to set it, mainly, using
    PHP:
    ini_set('memory_limit''128M');
     
  9. Marcus

    Marcus Well-Known Member

    That's why my server is down now. I guess xf overwrites the php setting. I should declare the setting as admin setting.

    Do you know which pages need that much ram other than the search result page?
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    I'm pretty sure XenForo overriding the memory limit isn't the cause of your server being down.

    Is it a new server? Has it ever worked? If the server previously worked and now it has stopped, how can it be the memory limit solely responsible? What other changes have you made to the server?
     
  11. Marcus

    Marcus Well-Known Member

    It's a micro amazon instance with 1 GB of RAM and I calculated everything for mysql, nginx, php-fpm (for 32M per child spawned). I did not know that it's actually 128M per child which does make a difference if you only have 128M dedicated for php.
     
  12. Floren

    Floren Well-Known Member

    Minimal XenForo requirements are 128MB, I remember talking to @Mike about this and he suggested setting it to 256MB.
     
  13. sgr

    sgr Active Member

    Is XF still setting 128M as the minimum, or has that changed in the latest versions?
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    That hasn't changed.
     
  15. sgr

    sgr Active Member

    @Brogan


    I got this message in my logs after some users complained about not being able to upload images:


    memory_limit in php.ini is set at 64M, which appears to be low. I'll have to increase it, but I thought XenForo was already overriding it and making it 128M?

    Or are there some scripts like the file upload one which use the ini config rather than the XF runtime's 128M limit?
     
    Last edited: Oct 25, 2016

Share This Page