I have codeigniter framework in my project. My website is running on windows azure platform. Sometimes it's giving me this error:
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
I tried to change php.ini file by changing value of memory:
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.
Please, ask me if you need more information or code.
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.
FINAL SOLUTION:
I have updated my php.ini
file with this:
wincache.fcenabled=0
wincache.ocenabled=0
wincache.ucenabled=0
wincache.reroute_enabled = 0
wincache.srwlocks = 0
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:
wincache.reroute_enabled = 0
wincache.srwlocks = 0
Also update wincache to a latest version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With