PHP致命错误:wincache失败(windows azure)

时间:2022-10-07 00:09:33

I have codeigniter framework in my project. My website is running on windows azure platform. Sometimes it's giving me this error:

我的项目中有codeigniter框架。我的网站在windows azure平台上运行。有时它会给我这个错误:

PHP Fatal error: Failure in Wincache[6484] free_memory: Block 0x41d56d8 not in use in D:\home\site\wwwroot\system\libraries\Log.php on line 44

PHP致命错误:Wincache失败[6484] free_memory:第44行的D:\ home \ site \ wwwroot \ system \ libraries \ Log.php中未使用块0x41d56d8

I tried to change php.ini file by changing value of memory:

我试图通过更改内存值来更改php.ini文件:

ini_set('memory_limit','2048M');

But, then after I checked memory_get_peak_usage(); then I found that application is not even using more than 1MB. I don't know what's going on here. I am getting blank page and website gets down when this happens.

但是,在我检查了memory_get_peak_usage()之后;然后我发现应用程序甚至没有使用超过1MB。我不知道这里发生了什么。当这种情况发生时,我得到空白页面和网站。

Please, ask me if you need more information or code.

请问我是否需要更多信息或代码。

Log.php:

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 file is default codeigniter file.

log.php文件是默认的codeigniter文件。

FINAL SOLUTION:

最终解决方案:

I have updated my php.ini file with this:

我用这个更新了我的php.ini文件:

wincache.fcenabled=0
wincache.ocenabled=0
wincache.ucenabled=0
wincache.reroute_enabled = 0
wincache.srwlocks = 0

2 个解决方案

#1


3  

It's an issue with IIS or WinCache on Windows Server. You can follow official thread on a iis forum. Just to be sure, check following options in your php.ini:

这是Windows Server上的IIS或WinCache的问题。您可以在iis论坛上关注官方主题。为了确保,请检查php.ini中的以下选项:

wincache.reroute_enabled = 0
wincache.srwlocks = 0

Also update wincache to a latest version.

同时将wincache更新为最新版本。

#2


0  

The specific WinCache error message has been removed as of WinCache 1.3.7.5, which was pushed out in a recent Azure Web Services update.

从WinCache 1.3.7.5开始,已删除特定的WinCache错误消息,该消息已在最近的Azure Web服务更新中推出。

As for the meaning of the error message: While attempting to free a block of memory in a cross-process shared memory segment, WinCache detected that the block had already been freed. The message indicates that WinCache detected the problem, and avoided corrupting memory. The message should really be a Warning level message. Further, the executing request should run to completion, and a response should be returned to the customer.

至于错误消息的含义:在尝试释放跨进程共享内存段中的内存块时,WinCache检测到该块已被释放。该消息表明WinCache检测到该问题,并避免破坏内存。该消息应该是警告级别消息。此外,执行请求应该运行完成,并且应该将响应返回给客户。

Prior to WinCache 1.3.7.4, WinCache did not detect this scenario, and would wind up corrupting memory, which would eventually lead to an AV. So, the error message actually indicates that WinCache just saved you from crashing, and you're welcome!

在WinCache 1.3.7.4之前,WinCache没有检测到这种情况,最终会破坏内存,这最终会导致AV。因此,错误消息实际上表明WinCache只是让您免于崩溃,欢迎您!

#1


3  

It's an issue with IIS or WinCache on Windows Server. You can follow official thread on a iis forum. Just to be sure, check following options in your php.ini:

这是Windows Server上的IIS或WinCache的问题。您可以在iis论坛上关注官方主题。为了确保,请检查php.ini中的以下选项:

wincache.reroute_enabled = 0
wincache.srwlocks = 0

Also update wincache to a latest version.

同时将wincache更新为最新版本。

#2


0  

The specific WinCache error message has been removed as of WinCache 1.3.7.5, which was pushed out in a recent Azure Web Services update.

从WinCache 1.3.7.5开始,已删除特定的WinCache错误消息,该消息已在最近的Azure Web服务更新中推出。

As for the meaning of the error message: While attempting to free a block of memory in a cross-process shared memory segment, WinCache detected that the block had already been freed. The message indicates that WinCache detected the problem, and avoided corrupting memory. The message should really be a Warning level message. Further, the executing request should run to completion, and a response should be returned to the customer.

至于错误消息的含义:在尝试释放跨进程共享内存段中的内存块时,WinCache检测到该块已被释放。该消息表明WinCache检测到该问题,并避免破坏内存。该消息应该是警告级别消息。此外,执行请求应该运行完成,并且应该将响应返回给客户。

Prior to WinCache 1.3.7.4, WinCache did not detect this scenario, and would wind up corrupting memory, which would eventually lead to an AV. So, the error message actually indicates that WinCache just saved you from crashing, and you're welcome!

在WinCache 1.3.7.4之前,WinCache没有检测到这种情况,最终会破坏内存,这最终会导致AV。因此,错误消息实际上表明WinCache只是让您免于崩溃,欢迎您!