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

Unable to allocate memory for pool

Discussion in 'Troubleshooting and Problems' started by wargasmtg, Jun 9, 2011.

  1. wargasmtg

    wargasmtg New Member


    I just installed Xenforo the other week with Xenporta. It was going great till today. I would get white pages and sometimes an error (quick mention) that said something : there is an error try later.

    Then later i could acces the page and would goto the admin CP it would show a blank white page.

    Now i can go thru the logs and i see these errors happening a few times a day.

    Message : include(): Unable to allocate memory for pool.
    File : library/XenForo/Autoloader.php:119

    Details : Generated By: Unknown Account,

    Stack trace
    #0 /home/wargy/sites/cctld.dk/www/library/XenForo/Autoloader.php(119): XenForo_Application::handlePhpError(2, 'include(): Unab...', '/home/wargy/sit...', 119, Array) #1 /home/wargy/sites/cctld.dk/www/library/XenForo/Autoloader.php(119): XenForo_Autoloader::autoload() #2 [internal function]: XenForo_Autoloader->autoload('XenForo_Error') #3 /home/wargy/sites/cctld.dk/www/library/XenForo/Cron.php(34): spl_autoload_call('XenForo_Error') #4 /home/wargy/sites/cctld.dk/www/library/XenForo/Cron.php(64): XenForo_Cron->run() #5 /home/wargy/sites/cctld.dk/www/cron.php(12): XenForo_Cron::runAndOutput()
    Request state:
    array(3) { ["url"] => string(35) "http://cctld.dk/cron.php?1307555356" ["_GET"] => array(1) { [1307555356] => string(0) "" } ["_POST"] => array(0) { } }

    Now i am no wizzard when it comes to this. I have the feeling it is maybe related to the Registered Feeds?
    I have a few running that fetch some at certain intervals and post them in different sections on the forum.

    My forum is located here : http://cctld.dk there is not much there yet. Just some posts and articles and guides that i wrote.
    So i consider the forum tobe in a rather vanilla state.

    Any info is greatly appriciated.

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Are you on a shared server?

    Random errors such as this are usually due to overloading of resources, specifically memory allocation as indicated by the "Unable to allocate memory for pool" message.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This is a problem with APC. Here are some reported fixes I found:



    shawn likes this.
  4. wargasmtg

    wargasmtg New Member

    Hello Brogan, no i am on a dedicated one . though i am sharing it with another site that runs VB for 11 years now (maybe they will switch haha).

    Thanks Jake. One of the guys who is helping me out thinks you are deadon with the APC. He made some changes and we will see how it goes. I will report back if it is solved or not.

    Have a great day and thanks for the help so far !
  5. kontrabass

    kontrabass Well-Known Member

    Just to confirm for others googl'ing this error: this was indeed the solution on our server. Set the ttl to 0, and shm_size to 512M or higher in apc.ini
    Jake Bunce likes this.
  6. craigiri

    craigiri Well-Known Member

    My server has no apc.ini, but it's running.
    I assume I set it in php.ini?
  7. craigiri

    craigiri Well-Known Member

    Confirmed that it is set in php.ini

    I get the error, but the ttl is already zero. I increased the memory and will see what happens.
  8. craigiri

    craigiri Well-Known Member

    It seems the increased memory may have fixed those "unable to allocate" errors.

    As a point of information, I think most XF users can get by with 50-150 MB's of memory allocated to APC. I am running XF plus many add-ons plus another CMS and other scripts and, with a setting of 128 MB, am getting a 100% hit rate. That's over 61 million connections in 12 hours as reported by APC. only about 2/3 of that 128 has been used so far to achieve that hit rate (80 megs or so)

    The stock setting was doing OK, but probably having to flush the APC cache often.
    Jake Bunce likes this.

Share This Page