Cache rebuild dies repeatedly

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
 

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
 

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.
 

Ryan McAdams

Active 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.
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... ;)
 

Mike

XenForo developer
Staff member
What cache rebuild script is dying? And are you running in debug mode?
 

Ryan McAdams

Active member
What cache rebuild script is dying? And are you running in debug mode?
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
 
F

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.
 
Top