I'm trying to debug rare hangs of a Django application. So far I failed to isolate the problem, it happens about once a day in production and Gunicorn restarts the process with a message:
[CRITICAL] WORKER TIMEOUT
Is there a way to configure Django or Gunicorn to dump a stack trace of a process that is restarted?
Try setting your Gunicorn log to be more verbose, maybe set it to INFO
or DEBUG
that might shed more light in the log.
You could also take a look at Dog Slow, which will log slow requests. https://pypi.python.org/pypi/dogslow.
And for general logging win, try using Sentry: https://www.getsentry.com/welcome/.
Random question, any crons on the server running at that time, backups, that sorta thing?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With