Twisted server crashes unexpectedly while running django Twisted server crashes unexpectedly while running django python python

Twisted server crashes unexpectedly while running django


There is no 499 http code in rfc. Nginx defines 499 code itself.

When a client sent a request, and closed the connection without waiting forthe response, a 499 code occurs. If there're a lot of 499s in youraccess_log, it's mostly caused by the slow back-ends (too slow for yourusers to wait). You may have to optimize your website performance.

http://forum.nginx.org/read.php?2,213789,213794#msg-213794


  • you say the problem is from a client hitting a particular url (reproducible?)
  • since it works for you with gunicorn but not django-on-twisted, either the script is not working properly or twisted.web2 is the issue.

please try $ sh init.sh yourdjangoproject stand.

you can also try to modify run.py to catch SystemExit:

import pdbtry:   # __main__ stuff here.except (KeyboardInterrupt, SystemExit):   pdb.set_trace()