Report this

What is the reason for this report?

upstream timed out.

Posted on February 14, 2021

i’m running a flask app with Nginx and UWSGI and getting below error when i call a specific api.

2021/02/14 09:45:46 [error] 1988#1988: *1 upstream timed out (110: Connection timed out) while reading upstream, client: **.***.***.***, server: 1*7.*45.1*.**5, request: "POST /api/file_upload HTTP/1.1", upstream: "uwsgi://unix:/var/www/vocal/vocal.sock:", host: "1*7.*45.1*.**5"



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can make sure that the API details are correct, e.g calling the correct URL (domain or IP address)

Another option wis to adjust the timeout values for uWSGI and Nginx. For example, in your uWSGI configuration file, increase the harakiri value, and in your Nginx configuration file, increase the uwsgi_read_timeout value.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.