Show the mod_wsgi configuration from the Apache configuration file. Are you 
using:

WSGIApplicationGroup %{GLOBAL}

See:

http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

Graham

On 11/02/2014, at 9:45 AM, Dustin Lang <[email protected]> wrote:

> Hi,
> 
> I am using Django 1.6 (was seeing the same behavior with 1.3 also), apache 
> 2.2.22, mod_wsgi 3.3, on an ubuntu 12.04.4 box.
> 
> I made some I-thought-small changes to my app, and all of a sudden the web 
> server stalls processing the request.  Easy, you say, I'm a bonehead with an 
> infinite loop in his code.  But then when I run it under django's "manage.py 
> runserver", it works fine.  I know that runserver does some magic behind the 
> scenes, but I don't really see how it can be causing this sort of weirdness.
> 
> I am having trouble getting any debugging output.  I added a little 
> middleware WSGI app:
> 
>     from django.core.wsgi import get_wsgi_application
>     print >> sys.stderr, 'running django handler...'
>     application = get_wsgi_application()
>     print >> sys.stderr, 'django app:', application
> 
>     class Wrapper(object):
>         def __init__(self, app):
>             self.app = app
> 
>         def __call__(self, environ, start_response):
>             print >> sys.stderr, 'Calling app()'
>             try:
>                 r = self.app(environ, start_response)
>             except:
>                 print >> sys.stderr, 'app() raised exception'
>                 import traceback
>                 print >> sys.stderr, traceback.format_exc()
>                 return None
>             print >> sys.stderr, 'app() returned:', r
>             return r
> 
> and in the apache error logs I get:
> 
> [Mon Feb 10 22:35:52 2014] [error] running django handler...
> [Mon Feb 10 22:35:52 2014] [error] django app: 
> <django.core.handlers.wsgi.WSGIHandler object at 0x7f02881323d0>
> [Mon Feb 10 22:35:52 2014] [error] Calling app()
> [Mon Feb 10 22:35:52 2014] [error] 
> /usr/local/lib/python2.7/dist-packages/numpy/oldnumeric/__init__.py:11: 
> ModuleDeprecationWarning: The oldnumeric module will be dropped in Numpy 1.9
> [Mon Feb 10 22:35:52 2014] [error]   warnings.warn(_msg, 
> ModuleDeprecationWarning)
> [Mon Feb 10 22:35:52 2014] [error] 
> 
> and then nothing happens.  A few minutes later, I get:
> 
> [Mon Feb 10 17:40:21 2014] [info] mod_wsgi (pid=7424): Daemon process 
> deadlock timer expired, stopping process 'supernova'.
> [Mon Feb 10 17:40:21 2014] [info] mod_wsgi (pid=7424): Shutdown requested 
> 'supernova'.
> [Mon Feb 10 17:40:26 2014] [info] mod_wsgi (pid=7424): Aborting process 
> 'supernova'.
> Error opening file for reading: Permission denied
> [Mon Feb 10 22:40:26 2014] [error] [client 128.122.53.236] Premature end of 
> script headers: wsgi.py
> [Mon Feb 10 22:40:26 2014] [info] mod_wsgi (pid=7426): Destroying 
> interpreters.
> [Mon Feb 10 22:40:26 2014] [info] mod_wsgi (pid=7426): Cleanup interpreter ''.
> 
> 
> I am using WSGIDaemonProcess.  And for what it's worth, I don't see an apache 
> or mod_wsgi process in 'top' while this is going on.
> 
> I get the same behavior using the default embedded-mode mod_wsgi.
> 
> Obviously I need to go see if I can figure out what exact change in my code 
> triggered this, but does anyone have any extra hints on tracking down this 
> kind of problem?
> 
> Thanks,
> --dustin
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to