XF 1.3 ErrorException: Fatal Error: Out of memory (allocated 65798144) (tried to allocate 4194304 bytes)

Hornstar

Well-known member
I just saw this error come in my server log.

Code:
ErrorException: Fatal Error: Out of memory (allocated 65798144) (tried to allocate 4194304 bytes) - library/XenForo/Link.php:771
Generated By: Unknown Account, Today at 1:03 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(46) "http://www.***.net/forums/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(3) {
["_xfRequestUri"] => string(33) "/forums/members/kikomania.140685/"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
That's a very low memory_limit. Is there anything you can do to get that raised higher?
Just to make sure I do it right. Do I:
1. edit the php.ini
2. Change memory_limit = 2128M
3. What would you change it to? It's currently on 212.
4. I am on litespeed. Do I restart liftespeed webserver when I am done?

ps. I have a feeling I am editing the wrong php.ini as it is saying it is set to 212 yet the error said it tried to allocate a different amount. How can I be sure?
 
If the limit is currently that, then that's obviously considerably less than the limit suggested by the error message.

I believe there is a similar config in Litespeed that overrides PHP's memory_limit. As per the error it is overriding it as low as 64M. Find the limit in Litespeed and set it to the same as the value in php.ini.
 
4. I am on litespeed. Do I restart liftespeed webserver when I am done?

ps. I have a feeling I am editing the wrong php.ini as it is saying it is set to 212 yet the error said it tried to allocate a different amount. How can I be sure?
Normally for it to take effect (at least on OLS) you do have to do a graceful restart. And (again on OLS) the php.ini it uses is in /usr/local/lsws/lsphp5/lib.
I'm in the process of upgrading all my sites to OLS 1.3.1 and their are either compiles of OLS going on or upgrading php, but as soon as one of them is done I'll see if I can find where that setting that @Chris D refers to is.

EDIT:
I believe this is the area that you can set it at.
Screen Shot 2014-05-07 at 11.30.18 AM.webp
 
Normally for it to take effect (at least on OLS) you do have to do a graceful restart. And (again on OLS) the php.ini it uses is in /usr/local/lsws/lsphp5/lib.
I'm in the process of upgrading all my sites to OLS 1.3.1 and their are either compiles of OLS going on or upgrading php, but as soon as one of them is done I'll see if I can find where that setting that @Chris D refers to is.

EDIT:
I believe this is the area that you can set it at.
View attachment 73284

Thanks. Which one in particular? Is it the memory hard or soft limit one? What have you set yours to?
 
Actually I was just thinking @Chris D you said something was overriding it at 64M however in litespeed where @Tracy Perry showed me to update it for the soft and hard memory limit. Mine was set at 300M and 600M, which I have now changed to 2064M however if something was limiting it to 64M then it would have to be something else right?
 
Actually I was just thinking @Chris D you said something was overriding it at 64M however in litespeed where @Tracy Perry showed me to update it for the soft and hard memory limit. Mine was set at 300M and 600M, which I have now changed to 2064M however if something was limiting it to 64M then it would have to be something else right?
Yep, either your php.ini setting or possibly a config.php setting.
Have you done a custom compile of PHP or are you running with what it installed?
 
My host did the install, but I am fairly sure it was default. My php.ini is set to 2064M and I also checked my phpinfo.php file and it came back showing it was 2064M

What config.php file is there with a memory setting in it?
 
My host did the install, but I am fairly sure it was default. My php.ini is set to 2064M and I also checked my phpinfo.php file and it came back showing it was 2064M

What config.php file is there with a memory setting in it?
Not by default... but I believe it can be set in there also.... and it's the config file for XenForo.

There is also the possibility that your server is out of physical memory.

EDIT:
Found this post by Mike on something similar
http://xenforo.com/community/threads/fatal-error-out-of-memory.67458/#post-708690
 
Back
Top Bottom