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

XF 1.2 Fatal Error: Out of memory?

Discussion in 'Troubleshooting and Problems' started by BassMan, Jan 27, 2014.

  1. BassMan

    BassMan Well-Known Member

    I've noticed that almost everytime a new post come to a popular thread with many watchers I get this error:

    Server Error Log
    Error Info
    ErrorException: Fatal Error: Out of memory (allocated 2621440) (tried to allocate 7680 bytes) -library/Zend/Controller/Response/Abstract.php:304
    Generated By: Unknown Account, danes ob 11:40
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}

    - - - - - - - - - - - - - - - - - - - -

    What could be wrong?
  2. Liam W

    Liam W Well-Known Member

    This means that the server ran out out of RAM to give to PHP.

    That's a small amount (less than 3MB). Its likely that there was a small glitch and something used up all of the servers memory causing this error.

    Its unlikely to happen again.

  3. BassMan

    BassMan Well-Known Member

    The point is it happens quite often. I'll post again when new error arrives. Well, I know when it will arrive. When a new post in popular thread will be published.
  4. Liam W

    Liam W Well-Known Member

    Do you have access to the server configuration?

    It could be due to an Apache limit. Check the httpd.conf file for an RLimitMEM entry, and remove it.

  5. BassMan

    BassMan Well-Known Member

    I don't have access to server configuration.
  6. Sheratan

    Sheratan Well-Known Member

    Try to reduce the number of installed add on.
  7. BassMan

    BassMan Well-Known Member

    Currently I have 43 add-ons. Is that so much? Lot's of them are small ones.
  8. Mike

    Mike XenForo Developer Staff Member

    Here, < 3MB before running out of memory is incredibly low. The Apache configuration is certainly a possibility, but it could be something else. Regardless, it's something you would need to talk to your host about. It's possible that your server is legitimately out of memory, though I would expect an explicit limit to be the main cause. For reference, the default PHP memory limit is 128MB.

    If they can't (or refuse to) resolve the issue and it's happening with some frequency, you may want to consider a different host.
    BassMan likes this.
  9. BassMan

    BassMan Well-Known Member

    Thank you, Mike. I'll contact my host right away and report back here.
  10. BassMan

    BassMan Well-Known Member

    I got reply from my host.

    They say that php limit is set to 128MB. They also assure that the problem is certainly not in this to make the server run out of memory.

    This error they have already seen and usually occurs because of a problem in code, some incompatibilities or problems with permissions.

    Now I really don't know how to solve this out. Don't know where to start checking for errors.

    Also I've noticed one thing. When I installed XF and start using it installing add-ons went very quickly. But then suddenly when I install or uninstall any kind of add-on it just process it much longer. Let's say for about 3 min (sometimes more) to install xml file. Then I check the CPU usage in my CPanel and it is in red on 100%. Is this normal?
  11. BassMan

    BassMan Well-Known Member

  12. BassMan

    BassMan Well-Known Member

    Ok, now my host found out the problem:

    The thing is that the website reaches the limitation of processing power that you have with us available to the user.
    - - - -
    They just rises up the limit a little bit. I'll see what is coming next.

    But now I'm asking is XF cause of using so much CPU power? @Mike?
  13. Mike

    Mike XenForo Developer Staff Member

    Well, if there's nothing else on the site, then by definition it will be using it. However, usage will be bursty. For example, changing your add-on config will recalculate a lot of stuff so it doesn't have to be done later.

    Regardless, chopping the memory limit like that based on CPU usage is strange, unless they have some method of limiting the memory you use across all processes. If so, that would indicate multiple processes running simultaneously. If it's coming up frequently, that would potentially indicate that you have may outgrown your host. However, to some degree, I'm just taking stabs in the dark. The error you're getting is the OS not giving PHP memory when it requested it, either because it doesn't have any or there's a limit preventing it from happening. The host would be better positioned to debug it.
  14. BassMan

    BassMan Well-Known Member

    Ok, thank you.
  15. BassMan

    BassMan Well-Known Member

    Now they are offering my VPS hosting as my forum is growing fast. Yeah, we'll see about that... VPS is very expensive here.

Share This Page