There comes a dreaded time in every developer’s life when the inevitable happens – you are forced to switch to a new machine, and re-configure the entire dev environment you spent months (or years, in my case) tweaking and perfecting. For me, that time unexpectedly came last week when the hard disk on my laptop decided it was time for a winter holiday.
Armed with a reimaged laptop and Redfin’s internal developer machine setup guide, I was making decent progress until I hit a stumbling block: Apache was crashing. No matter what I did – on the first browser hit, I was greeted with a friendly error:
The Event Log had a slightly more descriptive message:
Faulting application Apache.exe, version 18.104.22.168, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00011e58.
Apache’s error log was mysterious in its own way:
[notice] Parent: child process exited with status 3221225477 -- Restarting.
To save you hours of debugging, hair pulling, reinstalling, and commenting out of httpd.conf that I went through, I’ll just point you directly to the root cause of the problem: https://issues.apache.org/bugzilla/show_bug.cgi?id=44338: mod_deflate crashes and does not return response. If you have Apache 2.0.63 on Windows, are loading the mod_deflate.so module, and are using it by including
AddOutputFilterByType/SetOutputFilter directives in your httpd.conf – Apache will crash. Currently there is no fix for this (although the bug above may be updated with a fix in the future) – you have a choice of taking out mod_deflate out of your Apache config, or upgrading to Apache 2.2.
Since mod_deflate is not essential in our developer setup, I happily chose the former option and got my Apache up and running.