阿帕奇prefork / mod_wsgi的衍生进程数貌似过去的配置 [英] apache prefork/mod_wsgi spawned process count seemingly past configuration
问题描述
在运行nginx的扭转回阿帕奇mpm- prefork / mod_wsgi的生产环境中,即时通讯看到的 90 阿帕奇子进程,当我可以预料,40将是最大的,如下面配置。配置/设置是什么令人兴奋的:
in a production environment running nginx reversing back to apache mpm-prefork/mod_wsgi, im seeing 90 apache child processes, when i would expect that 40 would be the maximum, as configured below. the configuration/setup is nothing exciting:
- Nginx的是通过
proxy_pass
反向代理到Apache,并提供静态媒体 - 阿帕奇仅提供动态请求
- nginx is reverse proxying to apache via
proxy_pass
, and serving static media - apache only serves dynamic requests
有关nginx的配置:
relevant nginx config:
worker_processes 15;
events {
worker_connections 1024;
}
keepalive_timeout 10;
有关Apache的配置:
relevant apache config:
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 20
MinSpareServers 7
MaxSpareServers 10
MaxClients 200
MaxRequestsPerChild 0
</IfModule>
mod_wsgi的配置,其中 web应用程序
是进程的名称:
WSGIDaemonProcess webapp user=www group=users threads=1 processes=40
我这么想吗?
推荐答案
该mod_wsgi的守护进程将显示为Apache服务器的子进程,即使他们是不一样的。这是因为mod_wsgi的守护进程是Apache的父进程的一个分支,而不是一个叉/ EXEC。换句话说,它们可执行文件的名称不改变
The mod_wsgi daemon processes will appear to be Apache server child processes even though they aren't the same. This is because the mod_wsgi daemon processes are a fork of Apache parent process and not a fork/exec. In other words, they executable name doesn't change.
要能够从正常的Apache服务器的子进程区分的mod_wsgi守护进程,提供显示名称选项WSGIDaemonProcess。此选项可以重命名过程从'PS'计划,像'顶'计划一些变种输出查看。查看现场的mod_wsgi指令WSGIDaemonProcess的文档。
To be able to distinguish mod_wsgi daemon processes from normal Apache server child processes, supply the 'display-name' option to WSGIDaemonProcess. This option allows you to rename the process as viewable in output from 'ps' program and some variants of programs like 'top'. See documentation of WSGIDaemonProcess directive on mod_wsgi site.
<一个href=\"http://$c$c.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess\">http://$c$c.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
这篇关于阿帕奇prefork / mod_wsgi的衍生进程数貌似过去的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!