Search code examples
phpapacheopcacheconnection-reset

Randomly gor error Connection reset by peer - Zend Opcache Php 5.4.7


My setup:

  • Windows 2008 R2 Server
  • PHP Version 5.4.7
  • Zend Opcache 7.0.3 (i just upgraded to 7.0.5 still the same)

Sometimes I will get Connection reset by peer when browsing the site using Chrome.

I enabled "use_cwd" settings as suggested by other thread. Still no help.

EDIT

I am seeing lots of error in Windows Event Viewer, happened every few minutes, which looks like:

Faulting application name: httpd.exe, version: 2.4.3.0, time stamp: 0x502f70a3
Faulting module name: php5ts.dll, version: 5.4.7.0, time stamp: 0x505114f8
Exception code: 0xc00000fd
Fault offset: 0x000398c9 
Faulting process id: 0xd1c
Faulting application start time: 0x01d183ec32bb4c1b
Faulting application path: ...\apache\bin\httpd.exe
Faulting module path: ...\php\php5ts.dll
Report Id: 72e103b0-efdf-11e5-ae29-22000afc56aa

But when I turn opcache off, I dont see these errors anymore.

My opcache conf

zend_extension = "xxxx\php\ext\php_opcache.dll"
opcache.memory_consumption=192
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=30
opcache.use_cwd=1
opcache.fast_shutdown=1
opcache.enable_cli=0
opcache.blacklist_filename = "xxxx\mypath\opcache-blacklist.txt"

Any idea how to solve this problem? Will upgrading my PHP version to 5.5 solve this problem?

Thanks.


Solution

  • Exception code 0xc00000fd means Stack Overflow error. So I started investigate from that direction.

    It was due to the default ThreadStackSize of 1MB (default for Apache Windows) is too small. Increasing it to 8MB solved the problem for me.

    I solved this according to this post How do I increase the stack size for Apache running under Windows 7?