Apache子进程退出,状态为255 [英] Apache child process exited with status 255

查看:624
本文介绍了Apache子进程退出,状态为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...

我们正在 Microsoft Windows Server 2012,Apache/2.4.6(Win64)OpenSSL/1.0.1e PHP/5.5.1 上运行.

在24小时内,至少会定期发生5至10次Apache崩溃并重新启动.通常两次.因为PHP崩溃了.

Periodically, at least 5-10 times within 24 hours, Apache crashing and restarting. Mostly twice. Because PHP crashed.

整个应用程序都是PHP,因此将php配置为 FastCGI 并不能解决问题:Apache不会崩溃,但是PHP会崩溃.

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

这里有更多信息:

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日志:

[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

  • 在PHP中,没有什么特别的日志,并且崩溃前没有任何模式.
  • 并发连接也不会影响该问题-即使我们的用户很少,也会发生这种情况.
  • MySQL?但是没有错误指出这一点还是我在错误的地方看?
  • Windows?如何弄清楚?
  • PHP/Apache配置?好吧,还有什么..为什么?
  • 外星人...
    • In PHP log nothing special and no pattern before crash.
    • Also concurrent connections not affecting the problem - it's happens even when we have very few users.
    • MySQL? But no errors pointing to this or I looking in wrong place?
    • Windows? How to figure out?
    • PHP/Apache configuration? Well, what else.. and why?
    • Aliens...
    • 主要问题是为什么PHP崩溃?..

      The main question is why PHP is crashing?..

      提前谢谢!

      推荐答案

      就我而言,日志中仅此而已. 仅限:

      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();
      ?>
      

      此代码停止apache服务并启动新进程. 但是并不是所有的时间...有时工作得很好...有时会崩溃:(

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

      正确的代码是:

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

      有关以下内容的更多信息: PHP:利用exit();或者死();标头("Location:");

      More informations about: PHP: Utilizing exit(); or die(); after header("Location: ");

      这篇关于Apache子进程退出,状态为255的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆