I have a working nginx production server running a Django app, using uwsgi (set up with this tutorial).
nginx and uwsgi are communicating through a UNIX socket.
However, as soon as I turn DEBUG = False
in my Django settings, I get a 502 error. The nginx error log tells me:
2015/09/08 10:37:51 [error] 940#0: *4 upstream prematurely closed connection while reading response header from upstream, client: myIP, server: mydomain.ca, request: "GET /quests/ HTTP/1.1", upstream: "uwsgi://unix:///tmp/hackerspace.sock:", host: "myDomain"
How can I prevent the socket connection from timing out, and why is DEBUG = False making this difference?
Thanks!