windows下apache并发php,windows下apache经常卡死

经常性的卡死。怎么办,有人遇到过吗?

错误日志

[Sun Feb 03 18:16:09 2013] [notice] Child 4200: All worker threads have exited.

[Sun Feb 03 18:16:15 2013] [notice] Child 4200: Child process is exiting

[Sun Feb 03 18:18:35 2013] [notice] Parent: Received shutdown signal -- Shutting down the server.

[Sun Feb 03 18:18:35 2013] [notice] Child 4056: Exit event signaled. Child process is ending.

[Sun Feb 03 18:18:36 2013] [notice] Child 4056: Released the start mutex

[Sun Feb 03 18:19:05 2013] [notice] Parent: Forcing termination of child process 1f4

[Sun Feb 03 18:19:18 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:19:18 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:19:18 2013] [notice] Parent: Created child process 5980

[Sun Feb 03 18:19:18 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:19:19 2013] [notice] Child 5980: Child process is running

[Sun Feb 03 18:19:19 2013] [notice] Child 5980: Acquired the start mutex.

[Sun Feb 03 18:19:19 2013] [notice] Child 5980: Starting 120 worker threads.

[Sun Feb 03 18:19:19 2013] [notice] Child 5980: Listening on port 80.

[Sun Feb 03 18:23:27 2013] [notice] Child 5980: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

[Sun Feb 03 18:23:27 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:23:28 2013] [notice] Child 5980: Released the start mutex

[Sun Feb 03 18:23:28 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:23:28 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:23:28 2013] [notice] Parent: Created child process 5324

[Sun Feb 03 18:23:28 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:23:29 2013] [notice] Child 5324: Child process is running

[Sun Feb 03 18:23:29 2013] [notice] Child 5324: Acquired the start mutex.

[Sun Feb 03 18:23:29 2013] [notice] Child 5324: Starting 120 worker threads.

[Sun Feb 03 18:23:29 2013] [notice] Child 5324: Listening on port 80.

[Sun Feb 03 18:23:34 2013] [notice] Child 5980: All worker threads have exited.

[Sun Feb 03 18:23:39 2013] [notice] Child 5980: Child process is exiting

[Sun Feb 03 18:30:28 2013] [notice] Child 5324: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

[Sun Feb 03 18:30:28 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:30:29 2013] [notice] Child 5324: Released the start mutex

[Sun Feb 03 18:30:30 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:30:30 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:30:30 2013] [notice] Parent: Created child process 5508

[Sun Feb 03 18:30:30 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:30:30 2013] [notice] Child 5508: Child process is running

[Sun Feb 03 18:30:30 2013] [notice] Child 5508: Acquired the start mutex.

[Sun Feb 03 18:30:30 2013] [notice] Child 5508: Starting 120 worker threads.

[Sun Feb 03 18:30:30 2013] [notice] Child 5508: Listening on port 80.

[Sun Feb 03 18:30:33 2013] [notice] Child 5324: All worker threads have exited.

[Sun Feb 03 18:30:34 2013] [notice] Child 5324: Child process is exiting

[Sun Feb 03 18:34:41 2013] [notice] Child 5508: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

[Sun Feb 03 18:34:41 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:34:41 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:34:41 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:34:41 2013] [notice] Parent: Created child process 1056

[Sun Feb 03 18:34:41 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:34:43 2013] [notice] Child 5508: Released the start mutex

[Sun Feb 03 18:34:45 2013] [notice] Child 1056: Child process is running

[Sun Feb 03 18:34:45 2013] [notice] Child 1056: Acquired the start mutex.

[Sun Feb 03 18:34:45 2013] [notice] Child 1056: Starting 120 worker threads.

[Sun Feb 03 18:34:45 2013] [notice] Child 1056: Listening on port 80.

[Sun Feb 03 18:34:49 2013] [notice] Child 5508: All worker threads have exited.

[Sun Feb 03 18:34:55 2013] [notice] Child 5508: Child process is exiting

[Sun Feb 03 18:40:05 2013] [notice] Child 1056: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

[Sun Feb 03 18:40:05 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:40:06 2013] [notice] Child 1056: Released the start mutex

[Sun Feb 03 18:40:06 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:40:06 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:40:06 2013] [notice] Parent: Created child process 5764

[Sun Feb 03 18:40:07 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:40:09 2013] [notice] Child 5764: Child process is running

[Sun Feb 03 18:40:09 2013] [notice] Child 5764: Acquired the start mutex.

[Sun Feb 03 18:40:09 2013] [notice] Child 5764: Starting 120 worker threads.

[Sun Feb 03 18:40:09 2013] [notice] Child 5764: Listening on port 80.

[Sun Feb 03 18:40:17 2013] [notice] Child 1056: All worker threads have exited.

[Sun Feb 03 18:40:25 2013] [notice] Child 1056: Child process is exiting

[Sun Feb 03 18:44:31 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:44:31 2013] [notice] Child 5764: Exit event signaled. Child process is ending.

[Sun Feb 03 18:44:32 2013] [notice] Child 5764: Released the start mutex

[Sun Feb 03 18:44:34 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:44:34 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:44:34 2013] [notice] Parent: Created child process 4368

[Sun Feb 03 18:45:06 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:45:07 2013] [notice] Child 5764: Waiting 270 more seconds for 27 worker threads to finish.

[Sun Feb 03 18:45:08 2013] [notice] Child 4368: Child process is running

[Sun Feb 03 18:45:08 2013] [notice] Child 4368: Acquired the start mutex.

[Sun Feb 03 18:45:08 2013] [notice] Child 4368: Starting 120 worker threads.

[Sun Feb 03 18:45:08 2013] [notice] Child 4368: Listening on port 80.

[Sun Feb 03 18:45:30 2013] [notice] Parent: Received shutdown signal -- Shutting down the server.

[Sun Feb 03 18:45:31 2013] [notice] Child 4368: Exit event signaled. Child process is ending.

[Sun Feb 03 18:45:32 2013] [notice] Child 4368: Released the start mutex

[Sun Feb 03 18:45:32 2013] [notice] Child 4368: Terminating 108 threads that failed to exit.

[Sun Feb 03 18:45:32 2013] [notice] Child 4368: All worker threads have exited.

[Sun Feb 03 18:45:46 2013] [notice] Child 5764: Waiting 240 more seconds for 1 worker threads to finish.

[Sun Feb 03 18:46:00 2013] [notice] Parent: Forcing termination of child process 1e0

[Sun Feb 03 18:46:06 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:46:06 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:46:06 2013] [notice] Parent: Created child process 3468

[Sun Feb 03 18:46:06 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:46:07 2013] [notice] Child 3468: Child process is running

[Sun Feb 03 18:46:07 2013] [notice] Child 3468: Acquired the start mutex.

[Sun Feb 03 18:46:07 2013] [notice] Child 3468: Starting 120 worker threads.

[Sun Feb 03 18:46:07 2013] [notice] Child 3468: Listening on port 80.

[Sun Feb 03 18:46:20 2013] [notice] Child 5764: Waiting 210 more seconds for 1 worker threads to finish.

[Sun Feb 03 18:46:53 2013] [notice] Child 5764: All worker threads have exited.

[Sun Feb 03 18:46:54 2013] [notice] Child 5764: Child process is exiting

[Sun Feb 03 18:52:02 2013] [notice] Child 3468: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

[Sun Feb 03 18:52:02 2013] [notice] Parent: Received restart signal -- Restarting the server.

[Sun Feb 03 18:52:03 2013] [notice] Child 3468: Released the start mutex

[Sun Feb 03 18:52:04 2013] [notice] Apache/2.2.22 (Win32) PHP/5.2.10 configured -- resuming normal operations

[Sun Feb 03 18:52:04 2013] [notice] Server built: Jan 28 2012 11:16:39

[Sun Feb 03 18:52:04 2013] [notice] Parent: Created child process 2500

[Sun Feb 03 18:52:04 2013] [notice] Disabled use of AcceptEx() WinSock2 API

[Sun Feb 03 18:52:05 2013] [notice] Child 2500: Child process is running

[Sun Feb 03 18:52:05 2013] [notice] Child 2500: Acquired the start mutex.

[Sun Feb 03 18:52:05 2013] [notice] Child 2500: Starting 120 worker threads.

[Sun Feb 03 18:52:05 2013] [notice] Child 2500: Listening on port 80.

回复讨论(解决方案)

没遇到

1、请换成WIN7平台

2、使用集成环境包如WAMP

无解 以前在win2003下屡次碰到过

Disabled use of AcceptEx() WinSock2 API

加了那个参数 但是不加的话没多久内存就崩溃了...

linux 是王道 一年不用重启...哈哈哈

我擦,还真没在windows上弄过,windows的apache这么不给力么。。。

我擦,还真没在windows上弄过,windows的apache这么不给力么。。。

不知道怎么说...原本就不是在win上的web服务.也没啥奇怪吧,况且microsoft 可能还要保护自己的iis呢..

引用 4 楼 yufulou 的回复:我擦,还真没在windows上弄过,windows的apache这么不给力么。。。

不知道怎么说...原本就不是在win上的web服务.也没啥奇怪吧,况且microsoft 可能还要保护自己的iis呢..

呵呵

linux + nginx 欢迎你 嘿嘿

[Sun Feb 03 18:34:41 2013] [notice] Child 5508: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

httpd.conf里调整一下MaxRequestsPerChild,太大 太小都会造成死机,

windows下不会计算,linux下可以这样做:

cat /proc/PIDHERE/status | grep VmRSS

返回一个数值,比如VmRSS: 204800 kB

然后如果ram = 4g, 4GB * 1024 * 1024 = 4,194,304 KB.

4194304 KB / 204800 KB = 20 processes

PS: 有些linux版本,直接用 cat /proc/PIDHERE/status, 然后找到VmRSS这一行。

路过看看,路过看看。

知名的lamp(Linux+Apache+MySQL+PHP)才是王道。。。

linux + nginx 欢迎你 嘿嘿就这么搞了。换了以后马上解决

[Sun Feb 03 18:34:41 2013] [notice] Child 5508: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.

httpd.conf里调整一下MaxRequest……

感谢,已经换linux了换了以后解决了

真心没有遇到过...还是php、mysql、apache一个一个分布安装吧...各个问题能把握到...不过Linux+Nginx 真心好用...

是否是你程序执行的问题。

也遇到过这样的问题,各种测试,win7、win2003、win2008,自已配置的,集成包wamp等,

最后还是认为apache在windows下的线程并发处理没有做好。

后来改用visual-nmp(nginx集成包)解决了。

apache在windows下根本就不能用,只能用于开发,

在windows下架设php还是用nginx比较好。用visual-nmp架设的,压力测试一下还行。

检查配置文件中的路径

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值