Apache child process terminated with status 255

After much searching, trying, fixing, waiting and crying, and before I give up, I want to take the last chance for this error ...

We work on Microsoft Windows Server 2012, Apache / 2.4.6 (Win64) OpenSSL / 1.0.1e PHP / 5.5.1.

Periodically, at least 5-10 times within 24 hours, Apache crashes and restarts. Mostly twice. Because PHP crashes.

The whole application is PHP, so setting php as FastCGI will not solve the problem: Apache will not crash, but PHP will.

here is additional information:

Windows Event Log:

Faulting application name: httpd.exe, version: 2.4.6.0, time stamp: 0x51e441d6 Faulting module name: php5ts.dll, version: 5.5.1.0, time stamp: 0x51e849b0 Exception code: 0xc0000005 Fault offset: 0x00000000000572d8 Faulting process id: 0xac0 Faulting application start time: 0x01d0a96634f3d129 Faulting application path: C:\Apache24\bin\httpd.exe Faulting module path: C:\PHP\php5ts.dll Report Id: 06409cc4-1568-11e5-93ff-d43d7edb03a9 Faulting package full name: Faulting package-relative application ID: 

Apache Log:

 [Thu Jun 18 06:13:44.284810 2015] [mpm_winnt:notice] [pid 2736:tid 392] AH00428: Parent: child process 2752 exited with status 255 -- Restarting. [Thu Jun 18 06:13:44.487977 2015] [mpm_winnt:notice] [pid 2736:tid 392] AH00455: Apache/2.4.6 (Win64) OpenSSL/1.0.1e PHP/5.5.1 configured -- resuming normal operations [Thu Jun 18 06:13:44.487977 2015] [mpm_winnt:notice] [pid 2736:tid 392] AH00456: Apache Lounge VC11 Server built: Jul 15 2013 20:45:22 [Thu Jun 18 06:13:44.487977 2015] [core:notice] [pid 2736:tid 392] AH00094: Command line: 'c:\\Apache24\\bin\\httpd.exe -d C:/Apache24' [Thu Jun 18 06:13:44.487977 2015] [mpm_winnt:notice] [pid 2736:tid 392] AH00418: Parent: Created child process 4408 
  • There is nothing special in the PHP log and no pattern before the crash.
  • Also, simultaneous connections do not affect the problem - this happens even when we have very few users.
  • MySQL? But no errors indicating this, or am I not in the wrong place?
  • Windows? How to find out?
  • PHP / Apache configuration? Well, what else .. and why?
  • Aliens ...

The main question is: why does PHP crash? ..

Thanks in advance!

+8
windows php mysql apache
source share
3 answers

In my case, nothing else in the magazines. Only:

  Parent: child process XXXX exited with status 255 -- Restarting 

The problem was the redirect code:

 <?php header('HTTP/1.1 304 Not Modified'); exit(); ?> 

This code stops the apache service and starts new processes. But not all the time ... sometimes it worked fine ... sometimes it crashes :(

The correct code is:

 <?php header('HTTP/1.1 304 Not Modified'); die(); ?> 

Additional information about: PHP: using exit (); or die (); after the heading ("Location:"),

+2
source share

There is a known error: whenever the file you include has a file size of 4096 or more, the php module and apache will stop working. It is not joke!

+1
source share

I think there are several different reasons for this child process XYZ exited with status 255 on the network. Most of them are related to PHP.

I just had the same crash on Windows, Apache 2.4.18 with PHP 5.6.16, when you send a user message through the Markdown parser from http://parsedown.org . This was fixed by surrounding the SQL source code in a message that had backlinks for identifier quotes, with three Markdown backlinks counting on the source code. Not diving deeper into Parsedown.php to find out exactly where it happened, but it should be something with these back windows.

0
source share

All Articles