apache prefork / mod_wsgi产卵超出configuration的进程

在生产环境运行nginx反向回到Apache mpm-prefork / mod_wsgi,即时消息看到90个 Apachesubprocess,当我期望40将是最大的,如下configuration。 configuration/设置并不令人兴奋:

  1. nginx通过proxy_pass反向代理到apache,并提供静态媒体
  2. Apache只提供dynamic的请求

相关的nginxconfiguration:

 worker_processes 15; events { worker_connections 1024; } keepalive_timeout 10; 

相关的Apacheconfiguration:

 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule mpm_prefork_module> StartServers 20 MinSpareServers 7 MaxSpareServers 10 MaxClients 200 MaxRequestsPerChild 0 </IfModule> 

mod_wsgi config,其中webapp是进程的名称:

 WSGIDaemonProcess webapp user=www group=users threads=1 processes=40 

我错过了什么?

我认为格雷厄姆·杜姆普尔顿最近可能在他的博客上回答了你的问题 。

编辑

我想我应该指出他的博客文章主要是关于mod_python,但是我认为他对prefork工作方式的解释可能会让你对附加进程的来源有所了解。