Fix Various Apache crashes on Windows

Some random crashes you may face on your Windows development machine.

1. Apache keep crashing every few hundred requests

In Apache error.log:

 AH00428: Parent: child process 6096 exited with status 3221226356 — Restarting.


Apache’s default stack size is too small


Add the following setting to httpd.conf

<IfModule mpm_winnt_module>
   ThreadStackSize 8388608


Alternative Workaround: Use fastcgi instead of Apache module:


2. Apache random stop responding with Internet Explorer


VMWare/VirtualBox network driver do not handle AcceptEx() correctly


Add the following setting to httpd.conf

AcceptFilter https none 
AcceptFilter http none 
EnableSendfile Off 
EnableMMAP off


3. Apache still crashing with status 3221226356

Windows + PHP as Apache module is affected by this and other bugs that cause problems.
Switch to PHP as FCGI setup solve many problems, especially for server running Laravel.

1. Download a “non-thread safe” version of PHP

2. Create C:\Apache\conf\extra\httpd-php7.conf

LoadModule fcgid_module modules/

<IfModule fcgid_module>
   FcgidMaxProcesses 300
   FcgidMaxProcessesPerClass 300

   FcgidOutputBufferSize 65536
   FcgidConnectTimeout 10
   FcgidProcessLifeTime 0
   FcgidMaxRequestsPerProcess 0
   FcgidMinProcessesPerClass 0
   FcgidFixPathinfo 0
   FcgidProcessLifeTime 0
   FcgidZombieScanInterval 20
   FcgidMaxRequestLen 536870912
   FcgidIOTimeout 120
   FcgidTimeScore 3

   FcgidPassHeader Authorization

   FcgidInitialEnv PHPRC "C:\\PHP"
   FcgidInitialEnv PATH "C:\\PHP;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
   FcgidInitialEnv SystemRoot "C:\\Windows"
   FcgidInitialEnv SystemDrive "C:"
   FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
   FcgidInitialEnv windir "C:\\WINDOWS"

   DirectoryIndex index.html index.htm index.php

   <Files ~ "\.php$">
      Options Indexes FollowSymLinks ExecCGI
      AddHandler fcgid-script .php
      FcgidWrapper "C:/PHP/php-cgi.exe" .php

Edit C:\Apache\conf\httpd.conf, Add

# PHP7
Include conf/extra/httpd-php7.conf

4. Still Crash?

Reinstall a PROPER WAMP stack following this guide.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.