After using django 1.3 for a while I upgraded to django 1.4 and started 
noticing apache threads hanging indefinitely.  I set a timeout to avoid 
running out of threads, but it would be nice to know what is causing the 
issue in the first place.

Using an strace, I found that the threads are attempting to read from a 
socket and are not doing anything after that.

The apache logs were not helpful, but we did find the following stacktrace 
in our mod_wsgi process:

[Wed Aug 22 15:20:49 2012] [error] # ProcessId: 17018

[Wed Aug 22 15:20:49 2012] [error] # ThreadID: 1135962432

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 
241, in __call__

[Wed Aug 22 15:20:49 2012] [error]   response = self.get_response(request)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/core/handlers/base.py", line 
111, in get_response

[Wed Aug 22 15:20:49 2012] [error]   response = callback(request, 
*callback_args, **callback_kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/contrib/auth/decorators.py", 
line 20, in _wrapped_view

[Wed Aug 22 15:20:49 2012] [error]   return view_func(request, *args, 
**kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_openid_auth/user_whitelist/decorators.py",
 
line 25, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/dispatcher.py", line 
91, in __call__

[Wed Aug 22 15:20:49 2012] [error]   return (handler(request, *args, 
**kwargs) if handler else

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/contrib/auth/decorators.py", 
line 20, in _wrapped_view

[Wed Aug 22 15:20:49 2012] [error]   return view_func(request, *args, 
**kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_openid_auth/user_whitelist/decorators.py",
 
line 25, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_user_authorization/decorators.py", 
line 34, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/templates_decorators.py", 
line 61, in wrapped

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/multiresponse.py", line 
83, in wrapper

[Wed Aug 22 15:20:49 2012] [error]   context_instance, headers)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/multiresponse.py", line 
112, in __get_response

[Wed Aug 22 15:20:49 2012] [error]   context_instance = context_instance)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/shortcuts/__init__.py", line 
20, in render_to_response

[Wed Aug 22 15:20:49 2012] [error]   return 
HttpResponse(loader.render_to_string(*args, **kwargs), 
**httpresponse_kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
169, in render_to_string

[Wed Aug 22 15:20:49 2012] [error]   t = get_template(template_name)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
145, in get_template

[Wed Aug 22 15:20:49 2012] [error]   template, origin = 
find_template(template_name)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
134, in find_template

[Wed Aug 22 15:20:49 2012] [error]   source, display_name = loader(name, 
dirs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 42, 
in __call__

[Wed Aug 22 15:20:49 2012] [error]   return 
self.load_template(template_name, template_dirs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/saferef.py", line 
121, in remove

[Wed Aug 22 15:20:49 2012] [error]   function( self )

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 
250, in _remove_receiver

[Wed Aug 22 15:20:49 2012] [error]   for idx, (r_key, _) in 
enumerate(reversed(self.receivers)):

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/saferef.py", line 
121, in remove

[Wed Aug 22 15:20:49 2012] [error]   function( self )

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 
240, in _remove_receiver

[Wed Aug 22 15:20:49 2012] [error]   self.lock.acquire()

Has anyone come across anything similar or have any advice on how to debug 
further?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Y35HpKWTvmkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to