我有一个OSQA (python / django q&a应用程序)安装服务于8个不同的网站。这些网站都在开发中,收到的流量很少。该服务器是具有512MB ram的虚拟专用服务器。
Apache只在Nginx后面使用mod_wsgi来服务动态页面。我无法阻止Apache在每个请求中消耗越来越多的内存,直到服务器阻塞为止。
我对配置参数进行了实验,但没有太多幸运,以最小化内存占用。在apache2.conf中使用以下mpm_prefork参数:
StartServers 2
MinSpareServers 1
MaxSpareServers 4
MaxClients 4
MaxRequestsPerChild 1002个apache进程开始使用4MB,在第一个请求之后,有4个进程,每个进程接近50MB,并且随着每个新请求,这4个进程稳定地攀升到每个进程接近200MB。
我觉得好像有什么不对劲。我们非常感谢您的任何建议。
发布于 2010-11-01 20:40:57
KeepAlive Off
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 3
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 2
WSGIDaemonProcess osqaWSGI processes=2 python-path=/web/osqa_server:/web/osqa_server/lib/python2.6 threads=1 maximum-requests=550
WSGIProcessGroup osqaWSGI用10,000个并发点击量运行httperf,它仍然站立不动。
https://stackoverflow.com/questions/4063613
复制相似问题