How do I debug this Nginx to uWSGI timeout?

Solution 1:

The option triggering the timeout (in nginx) is

http://wiki.nginx.org/HttpUwsgiModule#uwsgi_read_timeout

its default is 60 seconds, so if you request does not generate output in that timeslice nginx will close the connection.

If you do not see error in uWSGI (a part i suppose from the "broken pipe" as nginx disconnected) i would investigate why the generation is so slow