Hi all,
I'm having a very complex issue with a rather large and complex
application of mine.
My production environment uses ELB -> nginx -> unicorn -> django.
On my production environment, when saving certain models via the admin,
I get a timeout. I have tens of thousands of requests per day only
certain models in a single admin page return timeout (and it's always
the same ones).
I copied the entire DB and could not reproduce this locally (in debug
mode, with slightly different settings).
I then proceeded to continue testing on one of the production servers
(having removed it from the balancer, of course):
When hitting via nginx -> gunicorn, I get the same issue.
When hitting via django-admin runserver, I cannot reproduce the issue.
When hitting nginx -> test_script.py[1], I cannot reproduce the issue.
So I'm kind of stuck trying to even find out what causes this timeout -
it would seem that the issue is only reproduced when gunicorn is part of
the recipe, but I can't debug its child processes (if its possible, I've
miserably failed to find out how).
FWIW, this admin only defines `inline`, `search_list` and
`list_display`. There's nothing funky about it
+-+-+-+-+-+
# test script
# interactively runs a wsgi app to which I can then add
`ipdb.set_trace()`s ;)
from myapp.wsgi import application
from werkzeug.serving import run_simple
run_simple('0.0.0.0', 8000, application)
+-+-+-+-+-+
Any ideas on how I can further debug this? Or if its possible to somehow
attach to a gunicorn child process. Or maybe profile function calls
somehow?
--
Hugo Osvaldo Barrera
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1449230781.659780.457943265.1D0ED7FA%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment