php APACHE 崩溃:父进程:子进程退出,状态为 3221225477 -- 正在重新启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10306272/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
APACHE Crashing: Parent: child process exited with status 3221225477 -- Restarting
提问by Shane
My following setup is Xampp 1.7.7 and here is the info for everything in that package: - Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
我的以下设置是 Xampp 1.7.7,这里是该包中所有内容的信息: - Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/ v5.10.1
I'm running the server on Windows XP SP3 32 bit OS, 4 gigs of ram, Quad Core.
我在 Windows XP SP3 32 位操作系统、4 演出内存、四核上运行服务器。
The issue I'm having in my apache error log file is:
我在 apache 错误日志文件中遇到的问题是:
[Tue Apr 24 15:55:55 2012] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Tue Apr 24 15:55:57 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 24 15:55:57 2012] [notice] Digest: done
[Tue Apr 24 15:55:59 2012] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Apr 24 15:55:59 2012] [notice] Server built: Sep 10 2011 11:34:11
[Tue Apr 24 15:55:59 2012] [notice] Parent: Created child process 776
[Tue Apr 24 15:56:00 2012] [notice] Disabled use of AcceptEx() WinSock2 API
[Tue Apr 24 15:56:01 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 24 15:56:01 2012] [notice] Digest: done
[Tue Apr 24 15:56:02 2012] [notice] Child 776: Child process is running
[Tue Apr 24 15:56:02 2012] [notice] Child 776: Acquired the start mutex.
[Tue Apr 24 15:56:02 2012] [notice] Child 776: Starting 350 worker threads.
[Tue Apr 24 15:56:02 2012] [notice] Child 776: Listening on port 443.
[Tue Apr 24 15:56:02 2012] [notice] Child 776: Listening on port 80.
This seems to occur sporadically throughout the day and I even tried using Win32DisableEx, EnableIMAP Off and EnableSendFile Off in the apache conf file. I also tried copying the libmysql.dll file to the system32 and apache/bin folders with no avail.
这似乎在一天中偶尔发生,我什至尝试在 apache conf 文件中使用 Win32DisableEx、EnableIMAP Off 和 EnableSendFile Off。我还尝试将 libmysql.dll 文件复制到 system32 和 apache/bin 文件夹,但无济于事。
If anyone knows other reasons this error for the child process exiting and causing apache to crash, info would be greatly appreciated. If any additional log files are needed please let me know.
如果有人知道此错误导致子进程退出并导致 apache 崩溃的其他原因,将不胜感激。如果需要任何其他日志文件,请告诉我。
Tks, Shane.
谢恩,谢恩。
回答by kuba
The error code 3221225477is 0xC0000005in hex, which on Windows is:
错误代码3221225477是0xC0000005十六进制的,在 Windows 上是:
#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L)
Access violation is Windows' version of "segmentation fault", which simply said means that the program tried to access a memory which is not allocated. This can happen for a lot of different reasons, but mostly (if not always) is a bug in the program.
访问冲突是 Windows 版本的“分段错误”,简单地说就是程序试图访问未分配的内存。发生这种情况的原因有很多,但大多数(如果不总是)是程序中的错误。
Now, my guess for your situation, is that there is either a bug in PHP or in one of PHP's extensions or in Perl or some Perl application. Apache itself is usually very stable, but if you use some unusual extension, it might be the cause, too.
现在,我对您的情况的猜测是 PHP 或 PHP 的扩展之一或 Perl 或某些 Perl 应用程序中存在错误。Apache 本身通常非常稳定,但如果您使用一些不寻常的扩展,它也可能是原因。
I would suggest updating all your configuration to latest versions. If you want to find the source of the problem for sure, run Apache inside a debugger, like Visual Studio or OllyDbg. When the exception (access violation) happens, it will stop execution (instead of restarting) and you'll see in which module it is.
我建议将您的所有配置更新到最新版本。如果您想确定问题的根源,请在调试器中运行 Apache,例如 Visual Studio 或 OllyDbg。当异常(访问冲突)发生时,它将停止执行(而不是重新启动),您将看到它在哪个模块中。
Also take a look in the access log, if there is a suspiciousrequest with the same timestamp as the error. But it may happen that the crash happens before the request is saved in the logfile.
还要查看访问日志,是否存在与错误具有相同时间戳的可疑请求。但也有可能在请求保存到日志文件之前发生崩溃。

