[英]Apache child process exited with status 255
After lot of searching, trying, fixing, waiting and crying and before I give up, I want to take the last chance here for this bug... 经过大量搜索,尝试,修复,等待和哭泣之后,在我放弃之前,我想在这里抓住这个错误的最后机会...
We're running on Microsoft Windows Server 2012, Apache/2.4.6 (Win64) OpenSSL/1.0.1e PHP/5.5.1 . 我们正在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 crashing and restarting. Apache崩溃并重新启动,至少在24小时内至少有5-10次。 Mostly twice. 通常两次。 Because PHP crashed. 因为PHP崩溃了。
The whole application is PHP, so configuring php as FastCGI won't solve the problem: Apache will not crash but PHP will. 整个应用程序都是PHP,因此将php配置为FastCGI不会解决问题:Apache不会崩溃,但是PHP会崩溃。
here some more info: 这里有更多信息:
Windows Event Log: Windows事件日志:
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: Apache日志:
[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
The main question is why PHP is crashing?.. 主要问题是为什么PHP崩溃?
Thanks in advance! 提前致谢!
In my case, nothing more in logs. 就我而言,仅此而已。 Only: 只要:
Parent: child process XXXX exited with status 255 -- Restarting
Problem was in redirect code: 问题出在重定向代码中:
<?php
header('HTTP/1.1 304 Not Modified');
exit();
?>
This code stops apache service and start new processes. 此代码停止apache服务并启动新进程。 But not all time... sometimes worked fine... sometimes crashes :( 但并非所有时间...有时工作正常...有时会崩溃:(
Correct code is: 正确的代码是:
<?php
header('HTTP/1.1 304 Not Modified');
die();
?>
More informations about: PHP: Utilizing exit(); 有关以下信息的更多信息: PHP:使用exit(); or die(); 或者死(); after header("Location: "); 在header(“ Location:”)之后;
There is a known bug: Whenever a file you include has a filesize of 4096 or more the php module and apache will stopp working. 有一个已知的错误:每当您包含的文件的文件大小为4096或更大时,php模块和apache就会停止工作。 Thats not a joke! 那不是在开玩笑!
I think there are several different causes for this child process XYZ exited with status 255
on the net. 我认为此child process XYZ exited with status 255
原因有多种。 Most of them are PHP related. 它们大多数与PHP有关。
I just had the same crash on Windows, Apache 2.4.18 with PHP 5.6.16, when passing a users' post message through the Markdown parser from http://parsedown.org . 当通过http://parsedown.org上的Markdown解析器传递用户的帖子消息时,我在Windows上(使用PHP 5.6.16的Apache 2.4.18)上发生了同样的崩溃。 Fixed it by surrounding SQL source code in the message which had backticks for identifier quotings, with the three backticks Markdown expects for source code. 通过在消息中包含带有标识符引号的反引号和Markdown期望源代码的三个反引号的SQL源代码来解决此问题。 Did not dive deeper into Parsedown.php to find out where it exactly happened, but it must be something with these backticks. 并没有深入研究Parsedown.php来确定它到底发生在哪里,但是一定有这些反引号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.