apache mod_wsgi仅在守护进程模式下崩溃

时间:2012-10-22 12:42:33

标签: python django apache mod-wsgi

我使用apache webserver和mod_python作为我的界面。我正在从mod_python转移到mod_wsgi。我已完成所有设置,一切正常。现在,当我添加以下行(以启用守护程序模式)时,该站点无法正常工作。

WSGIDaemonProcess test.tessite.com processes=5 threads=10 display-name=%{GROUP}

我收到来自服务器的响应500错误。当我查看Apache的错误日志时,我有了下面的内容,

[Mon Oct 22 12:31:07 2012] [error] [client 58.68.24.230] Premature end of script headers: ls.wsgi

这是我在conf中的WSGI设置,

#Set the number of process and threads for each process. process*thread number of requests can be handled at a time
WSGIDaemonProcess test.testsite.com processes=5 threads=10 display-name=%{GROUP}
#Sets which process group WSGI application is assigned to.
WSGIProcessGroup test.testsite.com
#Maps a URL to a filesystem location and designates the target as a WSGI script.
WSGIScriptAlias / /public/gdp/trunk/src/ukl/lis/process/ls.wsgi
<Directory /public/gdp/trunk/src/ukl/lis/process/>
    Order allow,deny
    Allow from all
</Directory>

为什么只在Daemon模式下发生?怎么解决这个问题?在非守护进程模式下运行是否安全?

1 个答案:

答案 0 :(得分:0)

查看https://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions,“Apache Process Crashes”部分,最后一个问题。 mod_python apache模块是否仍然加载?您使用的是具有C组件的任何第三方库吗?