Apache假死,Apache维护,高手请进,谢谢
前几天,Apache还是每隔1天死一次,我一直在尝试解决,可这两天,每隔一个小时就死一次,如果在他死后,我不在进程中手动结束掉httpd.exe,便会出现下面的log:
......[Sun Aug 16 09:20:45 2009] [notice] Parent: child process exited with status 1 -- Restarting.[Sun Aug 16 09:20:45 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 09:20:45 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 09:20:45 2009] [notice] Parent: Created child process 176[Sun Aug 16 09:20:45 2009] [notice] Child 176: Child process is running[Sun Aug 16 09:20:45 2009] [notice] Child 176: Acquired the start mutex.[Sun Aug 16 09:20:45 2009] [notice] Child 176: Starting 64 worker threads.[Sun Aug 16 09:20:45 2009] [notice] Child 176: Starting thread to listen on port 80.[Sun Aug 16 09:22:42 2009] [notice] Parent: Received restart signal -- Restarting the server.[Sun Aug 16 09:22:42 2009] [notice] Child 176: Exit event signaled. Child process is ending.[Sun Aug 16 09:22:43 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 09:22:43 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 09:22:43 2009] [notice] Parent: Created child process 948[Sun Aug 16 09:22:43 2009] [warn] (OS 10038)在一个非套接字上尝试了一个操作。 : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.[Sun Aug 16 09:22:43 2009] [notice] Child 948: Child process is running[Sun Aug 16 09:22:43 2009] [notice] Child 176: Released the start mutex[Sun Aug 16 09:22:43 2009] [notice] Child 948: Acquired the start mutex.[Sun Aug 16 09:22:43 2009] [notice] Child 948: Starting 64 worker threads.[Sun Aug 16 09:22:43 2009] [notice] Child 948: Starting thread to listen on port 80.[Sun Aug 16 09:22:44 2009] [notice] Child 176: Waiting for 64 worker threads to exit.[Sun Aug 16 09:22:44 2009] [notice] Child 176: All worker threads have exited.[Sun Aug 16 09:22:44 2009] [notice] Child 176: Child process is exiting[Sun Aug 16 09:23:52 2009] [notice] Parent: Received restart signal -- Restarting the server.[Sun Aug 16 09:23:52 2009] [notice] Child 948: Exit event signaled. Child process is ending.[Sun Aug 16 09:23:53 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 09:23:53 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 09:23:53 2009] [notice] Parent: Created child process 2976[Sun Aug 16 09:23:53 2009] [notice] Child 2976: Child process is running[Sun Aug 16 09:23:53 2009] [warn] (OS 10038)在一个非套接字上尝试了一个操作。 : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.[Sun Aug 16 09:23:53 2009] [notice] Child 948: Released the start mutex[Sun Aug 16 09:23:53 2009] [notice] Child 2976: Acquired the start mutex.[Sun Aug 16 09:23:53 2009] [notice] Child 2976: Starting 64 worker threads.[Sun Aug 16 09:23:53 2009] [notice] Child 2976: Starting thread to listen on port 80.[Sun Aug 16 09:23:54 2009] [notice] Child 948: Waiting for 64 worker threads to exit.[Sun Aug 16 09:23:54 2009] [notice] Child 948: All worker threads have exited.[Sun Aug 16 09:23:54 2009] [notice] Child 948: Child process is exiting[Sun Aug 16 09:47:42 2009] [notice] Parent: Received restart signal -- Restarting the server.[Sun Aug 16 09:47:42 2009] [notice] Child 2976: Exit event signaled. Child process is ending.[Sun Aug 16 09:47:42 2009] [warn] (OS 10038)在一个非套接字上尝试了一个操作。 : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.[Sun Aug 16 09:47:42 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 09:47:42 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 09:47:42 2009] [notice] Parent: Created child process 1776[Sun Aug 16 09:47:43 2009] [notice] Child 1776: Child process is running[Sun Aug 16 09:47:43 2009] [notice] Child 2976: Released the start mutex[Sun Aug 16 09:47:43 2009] [notice] Child 1776: Acquired the start mutex.[Sun Aug 16 09:47:43 2009] [notice] Child 1776: Starting 64 worker threads.[Sun Aug 16 09:47:43 2009] [notice] Child 1776: Starting thread to listen on port 80.[Sun Aug 16 09:47:44 2009] [notice] Child 2976: Waiting for 64 worker threads to exit.[Sun Aug 16 09:47:44 2009] [notice] Child 2976: All worker threads have exited.[Sun Aug 16 09:47:44 2009] [notice] Child 2976: Child process is exiting[Sun Aug 16 10:40:44 2009] [notice] Parent: child process exited with status 1 -- Restarting.[Sun Aug 16 10:40:45 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 10:40:45 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 10:40:45 2009] [notice] Parent: Created child process 632[Sun Aug 16 10:40:45 2009] [notice] Child 632: Child process is running[Sun Aug 16 10:40:45 2009] [notice] Child 632: Acquired the start mutex.[Sun Aug 16 10:40:45 2009] [notice] Child 632: Starting 64 worker threads.[Sun Aug 16 10:40:45 2009] [notice] Child 632: Starting thread to listen on port 80.....
......[Sun Aug 16 12:53:51 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.[Sun Aug 16 12:53:51 2009] [notice] Apache/2.2.4 (Win32) configured -- resuming normal operations[Sun Aug 16 12:53:51 2009] [notice] Server built: Jan 9 2007 23:17:20[Sun Aug 16 12:53:51 2009] [notice] Parent: Created child process 3300[Sun Aug 16 12:53:52 2009] [notice] Child 3300: Child process is running[Sun Aug 16 12:53:52 2009] [notice] Child 3300: Acquired the start mutex.[Sun Aug 16 12:53:52 2009] [notice] Child 3300: Starting 64 worker threads.[h:1
<IfModule !mpm_netware_module>
PidFile logs/httpd.pid
</IfModule>
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile logs/accept.lock
</IfModule>
</IfModule>
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 10
</IfModule>
# <IfModule mpm_worker_module>
# ServerLimit16
# StartServers 2
# MaxClients 150
# MinSpareThreads 25
# MaxSpareThreads 75
# ThreadsPerChild 25
# MaxRequestsPerChild 10
# </IfModule>
# <IfModule mpm_beos_module>
# StartThreads 10
# MaxClients 50
# MaxRequestsPerThread 10000
# </IfModule>
# <IfModule mpm_netware_module>
# ThreadStackSize 65536
# StartThreads 250
# MinSpareThreads 25
# MaxSpareThreads 250
# MaxThreads 1000
# MaxRequestsPerChild 20
# MaxMemFree 100
# </IfModule>
# <IfModule mpm_mpmt_os2_module>
# StartServers 2
# MinSpareThreads 5
# MaxSpareThreads 10
# MaxRequestsPerChild 20
# </IfModule>
<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 10</IfModule>
[解决办法]
看一下系统的其他记录,比如登录和访问记录,看是不是有人攻击。
[解决办法]
你去/php5/ext目录下看一看有没有这些dll.
如果你不需要这些dll,就去php.ini中去掉这些dll的加载,如果需要就去找dll,不一定默认在/php5/ext目录下的。
官网下载,不代表不需要自己去配置。
MaxRequestsPerChild 50表示当超过50个线程时,Apache会kill掉最旧的来回收资源。这个不算Apache重启。
[解决办法]
还有,既然你发现有人试图攻击就要防范,不一定别人取到你的用户密码才叫攻击,如果他不停访问你的服务器,会增加服务器的负荷,引起服务器宕机的。
[解决办法]
不有个apache专区么,这边解决不了就转到那边看看。
[解决办法]
是不是httpd.exe 100%cpu?
我的有时候也有这毛病 据说apache 本身有这个问题
关注。。。。
[解决办法]
windows下apache是一直有这个问题的,建议楼主换成IIS或签到Linux服务器下。
[解决办法]
楼主都真么说了~ ~
排查问题不是ME强项YE~
我这电脑有时候apache就是启不来~老觉得是领导在监控我工作。