In our django app run through gunicorn a worker restarts whenever there is a exception thrown in a call which is not handled. This also causes other processes to fail like socket server.
However if I run as dev which is without gunicorn, any exception thrown is just printed out to console and application keeps on working smoothly. Also sometime I feel they are getting randomly restarted.
How can I have the same behavior as in dev i.e. worker doesn't restart on an exception.
Below is the gunicorn config. Gunicorn version 19.7.1
$VIRT_ENV/gunicorn -c config.py utrade.wsgi:application \
--log-level=debug \
--timeout=30 \
--access-logfile=- \
--access-logformat="%(r)s %(s)s" \
--log-file=-
config.py
bind = 'unix:/code/internal.utradesolutions.com/tanmay.garg/web/web/utrade/run/gunicorn.sock'
workers = 5
daemon=True