簡體   English   中英

Joomla中的內存泄漏

[英]Memory leak in Joomla

我配置了一個新的Web服務器。 現在,我正在從備份中還原舊網站。 由於某種原因,我收到此錯誤:

[Sat Aug 09 04:10:49 2014] [warn] [client X.X.X.X] mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 71 bytes) in /var/www/clients/client3/web3/web/libraries/joomla/error/exception.php on line 117

第117行:

$this->backtrace = debug_backtrace();

對我來說很顯然index.php中存在一些內存泄漏。 這不是我的網站,所以我無法真正更改該腳本中的任何內容。 但是,它可以在舊服務器上工作。 任何人都知道是什么原因造成的? 我已經增加了php.ini中的memory_limit。

這是腳本(index.php):

<?php
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
JPluginHelper::importPlugin('system');
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');
$mainframe->route();
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');
$mainframe->render();
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');
echo JResponse::toString($mainframe->getCfg('gzip'));

我認為getApplication()函數某種程度上導致了內存泄漏。 phpinfo()結果: http : //pastebin.com/GEtqfWsK

當我將網站(基於Joomla)從舊服務器移到新服務器時,我一直收到此錯誤。 關於memory_limit的建議對我沒有幫助。 當我在configuration.php(Joomla根目錄)中將$ cache_handler從“ memcache”更改為“ file”時,問題已解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM