2012-10-22 34 views
0

我使用apache webserver和mod_python作爲我的接口。我正在從mod_python移動到mod_wsgi。我已經完成了所有的設置,一切工作正常。現在,當我添加以下行(啓用守護進程模式)時,該網站無法正常工作。apache 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> 

爲什麼這個在守護進程模式只發生?如何解決這個問題?運行在非守護進程模式下安全嗎?

+0

你想要做的第一件事是確定它是否與mod_python發生衝突。註釋掉和mod_python指令並禁止加載mod_python。然後重新測試,看看是否仍然存在。這樣你縮小了原因。 –

回答

0

看看https://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions,「Apache進程崩潰」一節,最後一個問題。 mod_python apache模塊是否仍然加載?您是否在使用具有C組件的任何第三方庫?

+0

它是如何獨立運行在非守護模式下的? –

+0

確實很奇怪。你可以嘗試一個「你好世界」的WSGI應用程序,看看是否有效?如果你加載你在真實應用程序中使用的所有庫,它是否仍然有效?你能確認你的WSGI進程確實崩潰嗎(進程號碼是否改變?) – Simon

相關問題