Windows – Why is Apache/PHP quietly crashing on Windows

apache-2.2PHPwindowszend-server

I have an instance of Apache2 installed on a Windows Server as part of Zend Server Community Edition (ZS CE) 4.0.6 and it began crashing multiple times a day after months of perfect operation and no changes to its sites or configuration. There seem to be few clues as to the problem.

Server Details

  1. Windows Server 2003 SP2 virtual machine
  2. ZS CE 4.0.6 (full stack install: Apache2/MySQL/PHP 5.3)
  3. Internal application server (40-60 users)
  4. Runs two sites: custom ZF application (most of the trasffic)
    and an instance of MediaWiki

The history:

  1. The full ZSCE stack was originally installed on the main application server
  2. We began experiencing an unresponsive server. A simple Apache restart solved the problem. The server would never come back up by itself, so it wasn't a high load.
  3. At first it was once a day then it became a couple of times a day and then eventually almost hourly.
  4. We decided to move the ZSCE installation to its own virtual machine on the same box, because I was convinced it was a conflict with the backup software. Everything worked perfectly.
  5. The "crashes" are appearing again; starting off daily just like last time. I think they are happening earlier each day too. Today actually saw multiple "crashes" even with a preemptive restart midmorning.

Notes:

  • There is nothing in any of the Apache logs to suggest the problems
  • I get a number of the following events in the application event log: 'Faulting application php-cgi.exe, version 5.3.0.0, faulting module php5.dll, version 5.3.0.0, fault address 0x0009d485'; they never seem to coincide with the problem.
  • I added the following directives to the httpd.conf to solve a similar problem. Seems to have helped then.
    • EnableMMAP off
    • EnableSendfile off
    • Win32DisableAcceptEx
  • I don't think its user based because I am very familiar with their usage patterns and they vary very little from day to day; hence it should have been a problem before.

I really prefer using ZS to a custom stack build, but this problem is obviously a deal breaker. Any help is appreciated.

Best Answer

Have you installed the latest Optimizer+ patch from Zend? Not sure if that's what's causing your crashes or not but it could be. See http://forums.zend.com/viewtopic.php?f=8&t=5152

If that doesn't help we can try to send you some debug binaries to figure out the problem (I work for Zend)