Re: Hung apache threads after upgrading to django 1.4

2012-09-13 Thread Dane
We have extended status on.  Here is a link to our full status output. 
 This does not occur consistently, but under high traffic we see an 
increasing amount of occurrences.

I appreciate the help.

http://pastebin.com/wP8Xfrwf

On Wednesday, September 12, 2012 9:20:10 AM UTC-5, Tom Evans wrote:
>
> On Wed, Sep 12, 2012 at 2:49 PM, Dane  
> wrote: 
> > 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: 
>
> The stacktrace doesn't look relevant tbh. 
>
> How are you determining that you have hanging threads? Eg, is the 
> scoreboard completely full? 
>
> It would be easier to debug if you could capture a snapshot of the 
> scoreboard whilst you think you are being affected. mod_status is your 
> friend, turn "ExtendedStatus on". 
>
> Cheers 
>
> Tom 
>

-- 
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/-/SHH0MsPA8tQJ.
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.



Re: Hung apache threads after upgrading to django 1.4

2012-09-12 Thread Tom Evans
On Wed, Sep 12, 2012 at 2:49 PM, Dane  wrote:
> 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:

The stacktrace doesn't look relevant tbh.

How are you determining that you have hanging threads? Eg, is the
scoreboard completely full?

It would be easier to debug if you could capture a snapshot of the
scoreboard whilst you think you are being affected. mod_status is your
friend, turn "ExtendedStatus on".

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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.



Hung apache threads after upgrading to django 1.4

2012-09-12 Thread Dane
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]