How to fix upstream timed out (110: Connection timed out) error in Nginx
When you come across “Upstream timed out (110: Connection timed out)” error in your Nginx log:
[error] upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: howtounix.info, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080", host: "howtounix.info", referrer: "requested_url"
That means it takes your web server more than 60 seconds to respond. To solve this problem in nginx.conf change the value of proxy_read_timeout directive. This directive determines how long nginx will wait to get the response to a request. By default it’s 60 seconds. Change it to 300 seconds:
server { listen 80; server_name howtounix.info; location / { ... proxy_read_timeout 300; ... } ... }
This should fix the problem.