2

I'm running a WordPress multisite(4.5.3) on Windows IIS (8.5.96).

Every now and then the server crashes with a Wincache error. I have updated both PHP and Wincache components on the server. Because at the moment I have to observe the server 24/7.

Faulting application name: php-cgi.exe, version: 5.6.22.0,time stamp: 0x57468660
Faulting module name: php_wincache.dll,version: 1.3.7.10, time stamp: 0x56ccce50
Exception code: 0xc0000005
Fault offset: 0x00015247
Faulting process id: 0x8cc
Faulting application start time: 0x01d1f8244e589ffc
Faulting application path: C:\Program Files (x86)\PHP\v5.6\php-cgi.exe
Faulting module path: C:\Program Files (x86)\PHP\v5.6\ext\php_wincache.dll
Report Id: 7fbf700b-6418-11e6-80cc-005056b77a12
Faulting package full name:
Faulting package-relative application ID:

Server:

-Windows Server 2012 R2 Standard

-Installed memory Ram 4 Gb

-Php-cgi.exe   (5.6.22.0)

-Wincache.dll   (1.3.7.10)

IIS:

-IIS 8.5.96

-Php 5.6

IIS Setup:

-Idle timeout 300

-Activity timeout 300

-Request timeout 300

-Application pool > Recycling 20 min.

-Application pool > Idle time-out 18 min.

Wordpress and plugins used:

-Wp multisite 4.5.3

-Atom Linkedin (1.0.0)

-Contact form 7 (4.3.1)

-Custom Facebook Feed (2.3.10)

-Redirection (2.4.3)

-Rename wp-login (2.5.5)

-Revolution Slider (5.0.6)

-W3 Total Cache (0.9.4.1)

-Wordfence Security (6.1.14)

-WordPress MU Domain Mapping (0.5.5.1)

-WP-Mail-SMTP (0.9.5)

-Yoast SEO (3.0.7)

Is it a server issue or perhaps a misconfiguration? Or is it a php, WordPress or any other software issue?

halfer
  • 19,824
  • 17
  • 99
  • 186
laweb
  • 31
  • 4

1 Answers1

1

Not sure whether this should be an answer or an comment, but here goes.

The exception code 0xc0000005 often means a shared memory access violation. At various places you find information about adding

wincache.namesalt=0x200000

to your configuration. This is a shared memory address to store objects in.

On the other hand: I'm using the same WinCache version in my environment, but it isn't used much (shared hosting). The clients use OPCache, and with OPCache the same exception code occurs frequently. It became less when I added

opcache.mmap_base=0x20000000

to our PHP.ini configuration, but it still isn't over.

The shared memory violation does not happen with PHP 7. If you can, switch to PHP 7.

Some reference links:

https://secure.php.net/manual/en/opcache.configuration.php#ini.opcache.mmap-base , https://www.apachelounge.com/viewtopic.php?p=29838#29838 , https://secure.php.net/manual/en/wincache.configuration.php#ini.wincache.namesalt , https://www.saotn.org/php-wincache-on-iis/

Jan Reilink
  • 458
  • 5
  • 15
  • Thanks Jan. I want to know if you are experiencing the same problems. If so, whether these changes have eliminated or reduced the frequency of server crashes? I haven't yet implemented these changes (still learning from your links). But if and when I implement these, I will keep you updated. Regards – laweb Aug 18 '16 at 14:14
  • Heya @laweb , yes I occasionally see 0xc0000005 crashes in php_opcache.dll (not php_wincache.dll because that's not widely used on our systems). Adding opcache.mmap_base=0x20000000 decreased the number of application crashes, but did not resolve it completely. Upgrading to PHP 7 did, for as far as I can tell. – Jan Reilink Aug 18 '16 at 14:24
  • Thanks Jan, I haven't had any problem with opcache.dll, but only with wincache.dll. I am in the process of setting up crashdump reporting, so we can find the exact problem. Thanks for your help. – laweb Aug 19 '16 at 08:36
  • Hi @laweb , have you found a way to resolve this issue with WinCache crashing? If not, can you edit & update your original question with your php.ini `[WinCache]` configuration? As said, most 0xc0000005 exceptions are caused by accessing shared memory protected by ASLR. I resolved most OPcache app crashes by setting a `mmap_base` value. I know, OPcache is not WinCache but it's pretty much all the same. Also for OPcache and PHP 5.6, `fast_shutdown` needs to be disabled. – Jan Reilink Sep 08 '16 at 14:30
  • Hi Jan, thanks for your help. I haven't yet resolved the issue completely. But for the moment I have deactivated wincache. In the meantime we are working on finding a solution for this. I don't know much about the difference of OPcache and wincache. At the moment everything works normal. Regards. – laweb Sep 12 '16 at 07:40
  • Oh, finally found people having the same issue! I searched for months where several random crashes came from, nothing was clear in my php.log file, any file can crash at any time... Then found php_wincache in the event viewer. All my troubles are gone since I stopped using that extension. But, what are the consequences of not using it? They say that cpu should be higher, but I didn't notice any difference for now. – foxontherock Dec 16 '16 at 20:37
  • I have marked this as the answer because this was helpful in resolving the issue. However, this does not entirely resolve the problems with wincache itself. Thanks all for the help. – laweb Jan 17 '17 at 09:00