【发布时间】:2009-05-27 02:09:00
【问题描述】:
在运行 nginx 的生产环境中,返回到 apache mpm-prefork/mod_wsgi,我看到 90 apache 子进程,而我预计 40 将是最大值,如下配置。配置/设置没什么令人兴奋的:
- nginx 正在通过
proxy_pass反向代理到 apache,并提供静态媒体 - apache 只处理动态请求
相关的nginx配置:
worker_processes 15;
events {
worker_connections 1024;
}
keepalive_timeout 10;
相关的apache配置:
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 20
MinSpareServers 7
MaxSpareServers 10
MaxClients 200
MaxRequestsPerChild 0
</IfModule>
mod_wsgi 配置,其中webapp 是进程的名称:
WSGIDaemonProcess webapp user=www group=users threads=1 processes=40
我错过了什么吗?
【问题讨论】: