【发布时间】:2015-04-24 16:32:57
【问题描述】:
我的项目中有 codeigniter 框架。我的网站在 Windows azure 平台上运行。有时它会给我这个错误:
PHP 致命错误:Wincache 失败[6484] free_memory:块 0x41d56d8 未使用 在 D:\home\site\wwwroot\system\libraries\Log.php 第 44 行
我尝试通过更改内存值来更改 php.ini 文件:
ini_set('memory_limit','2048M');
但是,在我检查了memory_get_peak_usage(); 之后,我发现应用程序甚至没有使用超过1MB。我不知道这里发生了什么。发生这种情况时,我会出现空白页面并且网站关闭。
如果您需要更多信息或代码,请询问我。
Log.php:
public function __construct()
{
$config =& get_config();
$this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/';
if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path)) // This is line 44.
{
$this->_enabled = FALSE;
}
if (is_numeric($config['log_threshold']))
{
$this->_threshold = $config['log_threshold'];
}
if ($config['log_date_format'] != '')
{
$this->_date_fmt = $config['log_date_format'];
}
}
log.php 文件是默认的 codeigniter 文件。
最终解决方案:
我已经用这个更新了我的php.ini 文件:
wincache.fcenabled=0
wincache.ocenabled=0
wincache.ucenabled=0
wincache.reroute_enabled = 0
wincache.srwlocks = 0
【问题讨论】:
-
您使用的是什么网络服务器,Apache、IIS 还是其他? D:\home\site\wwwroot\system\libraries\Log.php 文件的第 44 行是什么?
-
这表明 WinCache 试图在跨进程共享内存段中双重释放内存块。
-
@RolandoIsidoro:我使用的是 Windows azure。我已经更新了我的问题。
-
您提到有时会发生致命错误。您是否找出可能导致它的可能操作?就像请求特定页面一样。
标签: php codeigniter azure