突然网站就不动了,看了下日志:
- [Wed Mar 18 16:35:52 2015] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Child process is running
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Acquired the start mutex.
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Starting 64 worker threads.
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Starting thread to listen on port 55443.
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Starting thread to listen on port 55443.
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Starting thread to listen on port 58080.
- [Wed Mar 18 16:35:53 2015] [notice] Child 6100: Starting thread to listen on port 58080.
- [Wed Mar 18 16:39:30 2015] [warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
- [Wed Mar 18 16:40:53 2015] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
- [Wed Mar 18 16:46:24 2015] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
- [Wed Mar 18 16:54:31 2015] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
- [Wed Mar 18 16:54:33 2015] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
1.[warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
解决:
在 httpd.conf 文件中 去掉注释#Include conf/extra/httpd-mpm.conf
修改\ Apache2.2\conf\extra
下的httpd-mpm.conf
`# prefork MPM
StartServers: number of server processes to start
MinSpareServers: minimum number of server processes which are kept spare
MaxSpareServers: maximum number of server processes which are kept spare
MaxClients: maximum number of server processes allowed to start
MaxRequestsPerChild: maximum number of requests a server process serves
ServerLimit 3000
StartServers 100
MinSpareServers 100
MaxSpareServers 200
MaxClients 2500
MaxRequestsPerChild 0或者:
在httpd.conf 中加入 以下配置
#mpm
Win32DisableAcceptEx
EnableMMAP Off
EnableSendfile Off
ThreadsPerChild 1800
MaxRequestsPerChild 0
解决网站访问变慢,log中出现 指定的网络名不再可用 的错误,似乎日志里又出了
[Wed Mar 18 17:18:42 2015] [notice] Server built: Aug 28 2014 16:28:52
[Wed Mar 18 17:18:42 2015] [notice] Distributed by: The Apache Haus
[Wed Mar 18 17:18:42 2015] [notice] Compiled with: Visual Studio 2008
[Wed Mar 18 17:18:42 2015] [notice] Parent: Created child process 11428
[Wed Mar 18 17:18:42 2015] [notice] Disabled use of AcceptEx() WinSock2 API
[Wed Mar 18 17:18:42 2015] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Child process is running
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Acquired the start mutex.
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Starting 150 worker threads.
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Listening on port 55443.
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Listening on port 55443.
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Listening on port 58080.
[Wed Mar 18 17:18:44 2015] [notice] Child 11428: Listening on port 58080.
问题二:
2.Disabled use of AcceptEx() WinSock2 API notice
`The Apache service named reported the following error:
[Wed Mar 18 17:18:41 2015] [notice] Disabled use of AcceptEx() WinSock2 API `
网上搜了一下,这个问题是由于WinSock出错导致的,可以通过命令重置WinSock得以解决: