Основные hello.wsgi
отлично работают. Другое приложение django также работает отлично с абсолютно такой же версией virtualenv.
mod_wsgi
зависает в течение ~ 10 минут (!!!), и я вижу, что ничто не может указывать на проблему (loglevel debug):
[Tue Mar 25 23:11:08.878578 2014] [:info] [pid 4719:tid 140720591648640] mod_wsgi (pid=4719): Attach interpreter ''.
[Tue Mar 25 23:11:08.879171 2014] [:info] [pid 4717:tid 140720591648640] mod_wsgi (pid=4717): Attach interpreter ''.
[Tue Mar 25 23:11:10.891348 2014] [authz_core:debug] [pid 4730:tid 140720477226752] mod_authz_core.c(802): [client 127.0.0.1:40844] AH01626: authorization result of Require all granted: granted
[Tue Mar 25 23:11:10.891391 2014] [authz_core:debug] [pid 4730:tid 140720477226752] mod_authz_core.c(802): [client 127.0.0.1:40844] AH01626: authorization result of <RequireAny>: granted
[Tue Mar 25 23:11:10.891489 2014] [authz_core:debug] [pid 4730:tid 140720477226752] mod_authz_core.c(802): [client 127.0.0.1:40844] AH01626: authorization result of Require all granted: granted
[Tue Mar 25 23:11:10.891497 2014] [authz_core:debug] [pid 4730:tid 140720477226752] mod_authz_core.c(802): [client 127.0.0.1:40844] AH01626: authorization result of <RequireAny>: granted
[Tue Mar 25 23:11:10.903921 2014] [:info] [pid 4719:tid 140720469034752] mod_wsgi (pid=4719): Create interpreter 'prj-dev|'.
[Tue Mar 25 23:11:10.905378 2014] [:info] [pid 4719:tid 140720469034752] [remote 127.0.0.1:57616] mod_wsgi (pid=4719, process='prj.project-dev', application='prj-dev|'): Loading WSGI script '/var/www/prj.project-dev/venv/www/public/index.wsgi'.
[Tue Mar 25 23:11:12.014799 2014] [:error] [pid 4719:tid 140720469034752] /usr/lib/python2.7/dist-packages/numpy/oldnumeric/__init__.py:11: ModuleDeprecationWarning: The oldnumeric module will be dropped in Numpy 1.9
[Tue Mar 25 23:11:12.014843 2014] [:error] [pid 4719:tid 140720469034752] warnings.warn(_msg, ModuleDeprecationWarning)
[Tue Mar 25 23:11:12.014846 2014] [:error] [pid 4719:tid 140720469034752]
[Tue Mar 25 23:16:11.888631 2014] [:info] [pid 4719:tid 140720485820160] mod_wsgi (pid=4719): Daemon process deadlock timer expired, stopping process 'prj.project-dev'.
[Tue Mar 25 23:16:11.888761 2014] [:info] [pid 4719:tid 140720591648640] mod_wsgi (pid=4719): Shutdown requested 'prj.project-dev'.
[Tue Mar 25 23:16:16.889065 2014] [:info] [pid 4719:tid 140720121513728] mod_wsgi (pid=4719): Aborting process 'prj.project-dev'.
[Tue Mar 25 23:16:16.895499 2014] [core:error] [pid 4730:tid 140720477226752] [client 127.0.0.1:40844] End of script output before headers: index.wsgi
[Tue Mar 25 23:16:17.160980 2014] [:info] [pid 5295:tid 140720591648640] mod_wsgi (pid=5295): Attach interpreter ''.
Конфигурация Apache также не содержит ничего интересного. Такая же конфигурация работает на другом сервере.
<VirtualHost *:80>
ServerName prj-dev
ServerAdmin [email protected]
DocumentRoot "/var/www/prj.project-dev/venv/www/public"
ErrorLog /var/log/apache2/prj.project-dev/error_log
CustomLog /var/log/apache2/prj.project-dev/access_log common
Alias /media/ /var/www/prj.project-dev/venv/prj/prj/media/
Alias /static/ /var/www/prj.project-dev/venv/prj/prj/static/
Alias /usermedia/ /var/www/prj.project-dev/venv/prj/prj/usermedia/
<Directory /var/www/prj.project-dev/venv/prj/prj/usermedia>
Order deny,allow
Allow from all
</Directory>
<Directory /var/www/prj.project-dev/venv/prj/prj/media>
Order deny,allow
Allow from all
</Directory>
<Directory /var/www/prj.project-dev/venv/prj/prj/static>
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess prj.project-dev user=user group=user processes=2 threads=2 display-name=%{GROUP}
WSGIProcessGroup prj.project-dev
WSGIScriptAlias / /var/www/prj.project-dev/venv/www/public/index.wsgi
XSendFile on
<Directory /var/www/prj.project-dev/venv/www/public>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Ничего интересного в wsgi
:
import os, sys
activate_this = '/var/www/prj.project-dev/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
sys.path = [
'/var/www/prj.project-dev/venv/lib/python2.7/site-packages/',
'/var/www/prj.project-dev/venv/prj/',
'/var/www/prj.project-dev/venv/',
] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'prj.settings'
import django.core.handlers.wsgi
#from raven.contrib.django.middleware.wsgi import Sentry
application = django.core.handlers.wsgi.WSGIHandler()
#application = Sentry(django.core.handlers.wsgi.WSGIHandler())
Мой вопрос: как я могу получить истинную причину, по которой он висит?