Not a bug Memory exhausted

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:
[22-Mar-2012 07:47:59 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3932160 bytes) in /var/www/domain.com/community/library/XenForo/BbCode/Formatter/Base.php on line 1065

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.
 
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.
 
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.
Thanks Jake, so what is the recommended memory_limit for Xenforo? 128MB? 256MB?
 
128MB or higher. XF will try to increase the limit to 128MB at runtime if it is set lower than that.

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?
 
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?
 
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?
 
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.
 
@Brogan

That hasn't changed.


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

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16128 bytes) in /home/website/public_html/forums/library/XenForo/Image/Gd.php on line 78


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:
Top Bottom