Nginx upstream timed out for uwsgi_pass

A simple configuration of Django can cause a similar runtime error when running more than 60 seconds (this is the default timeout configuration). In some cases the application is required to work more than 60 seconds in the background and there should be a way to configure the timeout. Couldn't find any documentaion on how to acieve this, so dig into nginx uwsgi module sources.

The timeout configuration is declared in the line 220. Using this configuration in the following way you can change the uwsgi_pass timeout.

location / {
	root /home/user/mydjangoapp/;
	uwsgi_pass mydjangoapp;
	include uwsgi_params;
    uwsgi_read_timeout 600s;
}

Vahe Evoyan

Lead SW Engineer at Inomma. Physicist originally I made my career in different areas of software engineering, mostly web and mobile technologies.