apache prefork/mod_wsgi spawned process count seemingly past configuration [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-04 09:11:59

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.

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.

http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess

It's possible to have more apache processes than WSGI instances.

Change apache's MaxClients to 40 if you want to limit the apache processes.

You are using mod_wsgi in daemon mode, so mod_wsgi processes and Apache handler process are independent.

By your configuration right after the apache starts you have:

  • 40(processes=) mod_wsgi processes are started the same time.
  • 20(StartServers) Apache handler processes that can be automatically reduced to 10(MaxSpareServers) if there is not incoming activity.

Then on load, Apache handler processes can grow up to 200(MaxClients). But mod_wsgi processes count will be the same - 40.

My advice is to use worker mpm than Apache processes only dynamic content. It can help to reduce memory consumption and better scalability.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!