Allowed memory error when creating new style

Vilandra

Active member
When I try to add a new style, I'm getting these errors:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 131072 bytes) in /library/XenForo/Application.php on line 886

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /library/XenForo/Template/Compiler.php on line 1465

Thanks!
 
Are you running in debug mode? Your server seems to limited the ability to change the memory_limit, and debug mode uses a lot more memory.

Also, how many styles do you have?
 
Possibly not that much - unfortunately memory errors are a nightmare to track down. That said, 14 styles is really far from the norm, so it's a serious edge case. I'll try to improve the memory usage.
 
Is having a lot of styles going to be a problem on XF? My other site has more like 60 or 70 styles, and it would be better to know that before I start switching it over...lol...

Thanks :)
 
I don't mean this in a jerky way, I honestly want to know the answer lol - why do the cache's need to be rebuilt every time an addon is installed or a style is added?

:)
 
I bet a weeks salary (nah maybe not) that the host is using php-cgi or fastcgi.

both of which load the running processes of php into memory (which is normal) but this memory allocation is counted when php configs at run time.
so if you have a 32m allocation (seems like a common number used) php might be using 16m or more with out loading any of the data in to the process.

it sucks, but there is no alternative if you have limited memory, mod-php is way too insecure for a webhost, and chroot apache is too complex.

The only way to fix it is to talk to your webhost and ask them to increase memory, or move to a host that doesn't allocate memory (which is becoming increasingly more popular)
 
Top Bottom