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

Cache rebuild dies repeatedly

Discussion in 'XenForo Questions and Support' started by Ryan McAdams, Dec 6, 2010.

  1. Ryan McAdams

    Ryan McAdams Active Member

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home/site/public_html/community/library/Zend/Db/Statement/Mysqli.php on line 295

    The PHP limit is set to 256MB though...

    This issue doesnt make sense and is really a pain in the butt :(

    Any ideas?

    This is a big forum 2-3M posts and it only dies on the thread cache rebuild...

    Thanks,
    Ryan
     
  2. Ryan McAdams

    Ryan McAdams Active Member

    From phpinfo();

    memory_limit 256M 256M
     
  3. Ryan McAdams

    Ryan McAdams Active Member

    Well - I seem to have figured out why it was breaking at 128MB now :)

    See the line in bold/red -

    @ini_set('memory_limit', 128 * 1024 * 1024);

    PHP:
            public function beginApplication($configDir '.'$rootDir '.'$loadDefaultData true)
            {
                    if (
    $this->_initialized)
                    {
                            return;
                    }

                    if (
    function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
                    {
                            
    self::undoMagicQuotes($_GET);
                            
    self::undoMagicQuotes($_POST);
                            
    self::undoMagicQuotes($_COOKIE);
                            
    self::undoMagicQuotes($_REQUEST);
                    }
                    if (
    function_exists('set_magic_quotes_runtime'))
                    {
                            
    set_magic_quotes_runtime(false);
                    }

                    @
    ini_set('memory_limit'128 1024 1024);
                    
    ignore_user_abort(true);

                    @
    ini_set('output_buffering'false);
                    while (@
    ob_end_clean());

                    
    error_reporting(E_ALL E_STRICT & ~8192);
                    @
    ini_set('display_errors'true);
                    
    set_error_handler(array('XenForo_Application''handlePhpError'));
                    
    set_exception_handler(array('XenForo_Application''handleException'));

                    
    date_default_timezone_set('UTC');

                    
    self::$time time();

                    
    self::$host = (empty($_SERVER['HTTP_HOST']) ? '' $_SERVER['HTTP_HOST']);

                    require(
    XenForo_Autoloader::getInstance()->autoloaderClassToFile('Lgpl_utf8'));

                    
    $this->_configDir $configDir;
                    
    $this->_rootDir $rootDir;
                    
    $this->addLazyLoader('requestPaths', array($this'loadRequestPaths'));

                    if (
    $loadDefaultData)
                    {
                            
    $this->loadDefaultData();
                    }

                    
    $this->_initialized true;
            }
    I am manually bumping this to 256 to see if the process will complete...

    Is there a reason why you're overriding the server's limits? I mean I'm sure there is.. I'd just like to know why...

    Ryan
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Hmm. If changing that line fixes your problem then I would report this as a bug. The intention was obviously to set the limit high enough to avoid errors.
     
    runuo.com likes this.
  5. Ryan McAdams

    Ryan McAdams Active Member

    I would think so also...

    It just doesnt make a lot of sense and I'm banging my head against the wall because I just dont know wtf it's even doing... ;)
     
  6. Mike

    Mike XenForo Developer Staff Member

    What cache rebuild script is dying? And are you running in debug mode?
     
  7. Ryan McAdams

    Ryan McAdams Active Member

    In the first post I said it was the post/thread rebuild :)

    Now - 256MB didnt do it either...

    I went ahead and bumped it to 1024 and it ran like a champ!

    Ryan
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  9. Ryan McAdams

    Ryan McAdams Active Member

  10. Floris

    Floris Guest

    I still haven't been able on my dedicated box to get passed the 300k post count on a 750k board.
    I've completely written this feature off. It's costing me too much time.
     

Share This Page