即使几乎没有访问权限,Apache也会产生工人

最近阿帕奇一直在产卵,尽pipe似乎没有理由。 重新启动〜10分钟后,它会让产卵工作人员继续工作,直到达到最大数量,并且从不提供新的请求。

服务重启( service apache2 restart )后,我开始监视访问日志。 只有两个相当简单的要求,才开始产卵像疯子这样的工人:

 #/var/log/apache2/access.log 66.249.64.215 - - [17/Feb/2016:00:30:18 +0000] "GET /wp-content/uploads/2015/08/colarinho_3.png HTTP/1.1" 304 179 "-" "Googlebot-Image/1.0" 201.80.103.196 - - [17/Feb/2016:00:33:00 +0000] "GET /wp-content/uploads/2015/09/circulo_cromatico.png HTTP/1.1" 200 40642 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0" 

在完全停止提供新的请求之前,这是完整的状态。

 $apache2ctl fullstatus Apache Server Status for localhost (via ::1) Server Version: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.12 Server MPM: prefork Server Built: Jul 24 2015 17:25:11 __________________________________________________________________ Current Time: Wednesday, 17-Feb-2016 00:35:57 UTC Restart Time: Wednesday, 17-Feb-2016 00:26:33 UTC Parent Server Config. Generation: 1 Parent Server MPM Generation: 0 Server uptime: 9 minutes 24 seconds Server load: 0.00 0.06 0.18 Total accesses: 3 - Total Traffic: 48 kB CPU Usage: u0 s0 cu0 cs0 .00532 requests/sec - 87 B/second - 16.0 kB/request 22 requests currently being processed, 4 idle workers WWWWWWWWWWWWWWWWWWWW_WW___........................ Scoreboard Key: "_" Waiting for Connection, "S" Starting up, "R" Reading Request, "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup, "C" Closing connection, "L" Logging, "G" Gracefully finishing, "I" Idle cleanup of worker, "." Open slot with no current process Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request 0-0 6980 0/0/0 W 0.00 64 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/191.185.144.200 HTTP/1.0 1-0 6981 0/1/1 W 0.00 55 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 2-0 6982 0/1/1 W 0.00 52 0 0.0 0.04 0.04 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 3-0 6983 0/0/0 W 0.00 65 0 0.0 0.00 0.00 191.185.144.200 socialtailor.com.br:80 GET / HTTP/1.1 4-0 6984 0/0/0 W 0.00 64 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 5-0 6989 0/0/0 W 0.00 55 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 6-0 6990 0/0/0 W 0.00 50 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 7-0 6991 0/0/0 W 0.00 41 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 8-0 6992 0/0/0 W 0.00 50 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 9-0 6993 0/0/0 W 0.00 40 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 10-0 6994 0/0/0 W 0.00 38 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 11-0 6995 0/0/0 W 0.00 35 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 12-0 6996 0/0/0 W 0.00 24 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 13-0 6997 0/0/0 W 0.00 32 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 14-0 6998 0/0/0 W 0.00 24 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 15-0 6999 0/0/0 W 0.00 24 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 16-0 7000 0/0/0 W 0.00 11 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 17-0 7001 0/0/0 W 0.00 7 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 18-0 7002 0/0/0 W 0.00 7 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 19-0 7003 0/0/0 W 0.00 4 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 20-0 7004 0/1/1 _ 0.00 7 0 0.0 0.01 0.01 ::1 socialtailor.com.br:80 GET /server-status HTTP/1.0 21-0 7005 0/0/0 W 0.00 2 0 0.0 0.00 0.00 127.0.0.1 socialtailor.com.br:80 GET /lookup/127.0.0.1 HTTP/1.0 22-0 7006 0/0/0 W 0.00 0 0 0.0 0.00 0.00 ::1 socialtailor.com.br:80 GET /server-status HTTP/1.0 __________________________________________________________________ Srv Child Server number - generation PID OS process ID Acc Number of accesses this connection / this child / this slot M Mode of operation CPU CPU usage, number of seconds SS Seconds since beginning of most recent request Req Milliseconds required to process most recent request Conn Kilobytes transferred this connection Child Megabytes transferred this child Slot Total megabytes transferred this slot __________________________________________________________________ Apache/2.4.7 (Ubuntu) Server at localhost Port 80 

它正在服务的网站有一个WordPress的安装。 我将其更新到最新版本并禁用了cron作业。 任何想法为什么发生这种情况或如何进一步debugging?

更奇怪的是:如果我做了一个lynx http://localhost/它会一直等待响应(即使Apache没有被工作超载),然后Apache立刻开始产生大量的工作,就像以前一样。

我用下面的conf使用mpm_prefork:

 #/etc/apache2/mods-enabled/mpm_prefork.conf <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 50 MaxConnectionsPerChild 1000 </IfModule>