• 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

Floren

Well-known member
#1
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.
 

Jake Bunce

XenForo moderator
Staff member
#2
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.
 

Floren

Well-known member
#3
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?
 

Marcus

Well-known member
#9
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?
 

Chris D

XenForo developer
Staff member
#10
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?
 

Marcus

Well-known member
#11
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.
 

sgr

Active member
#15
@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: