Why there are issues with mod_wsgi, when runserver works?
I have been trying to get askbot to work on my local server as a deployed project with out luck. Just to state, I have a number of Django projects that I run, so I am familiar with Django and deploying. My system:
Ubunut 12.04 (64bit) python 2.7.3
EDIT: when running from django, i.e. python manage.py runserver it appears to run fine with my limited testing.
With respect to deploying askbot I have tried many permutations, but lets start from the basic pip install askbot. I follow askbot documentation instructions for install, config, deploy with default settings. The site runs and I can log in etc., the issue is that once it is deployed the site will always hang and crash at some point when I am testing it by asking/answering questions. I believe it has something to do with mod_wsgi. The following are two different cases from my apache error log.
First example:
[Sat Nov 17 11:16:06 2012] [info] mod_wsgi (pid=28541): Daemon process deadlock timer expired, stopping process 'askbot3'.
[Sat Nov 17 11:16:06 2012] [info] mod_wsgi (pid=28541): Shutdown requested 'askbot3'.
[Sat Nov 17 11:16:11 2012] [info] mod_wsgi (pid=28541): Aborting process 'askbot3'.
[Sat Nov 17 12:16:11 2012] [error] [client 127.0.0.1] Premature end of script headers: django.wsgi, referer: http://sodiioo.media.mit.edu/account/signin/
[Sat Nov 17 12:16:11 2012] [error] [client 127.0.0.1] Premature end of script headers: django.wsgi, referer: http://sodiioo.media.mit.edu/account/signin/
[Sat Nov 17 12:16:11 2012] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 625 to 384 : URL /forum/questions/ask/, referer: http://127.0.0.1/forum/questions/ask/
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Attach interpreter ''.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Shutdown requested 'askbot2'.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Stopping process 'askbot2'.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Destroying interpreters.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Cleanup interpreter ''.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Terminating Python.
[Sat Nov 17 12:16:11 2012] [info] mod_wsgi (pid=11144): Python has shutdown.
[Sat Nov 17 12:16:11 2012] [notice] caught SIGTERM, shutting down
[Sat Nov 17 12:16:12 2012] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Sat Nov 17 12:16:12 2012] [warn] mod_wsgi: Runtime using Python/2.7.3.
Second example:
[Sat Nov 17 13:29:16 2012] [info] mod_wsgi (pid=5964): Daemon process deadlock timer expired, stopping process 'askbot3'.
[Sat Nov 17 13:29:16 2012] [info] mod_wsgi (pid=5964): Shutdown requested 'askbot3'.
[Sat Nov 17 13:29:21 2012] [info] mod_wsgi (pid=5964): Aborting process 'askbot3'.
[Sat Nov 17 14:29:21 2012] [error] [client 127.0.0.1] Premature end of script headers ...
Comments
Does it work differently when you use the django runserver?
When running via django runserver it appears to work fine. That is I have not had any hanging issues while running via django server.
In that case it's unlikely to be due to a bug in askbot. Do versions of python for which mod_wsgi was built and your python version match?
The apache log states mod_wsgi compiled for python 2.7.2+, my system python is 2.7.3. I have libapache2-mod 3.3-4build1 installed.
Any suggestions?