Getting upstream error [connect() failed (110: Connection timed out) while connecting to upstream]

Maxim Dounin mdounin at mdounin.ru
Mon Jun 10 15:03:36 UTC 2019


Hello!

On Mon, Jun 10, 2019 at 02:15:03PM +0000, Vivek Solanki wrote:

> I have setup a nginx server through which requests are forwarding to AWS ELB by nginx proxy_pass (configured on /etc/nginx/default.d/my.conf) on. Behind AWS ELB tomcat application running on instances. After performing load test (15k-20k throughput) using Jmeter it is working fine, but after raising the throughput value it gives below upstream errors:
> 
> 2019/06/06 15:54:32 [error] 31483#0: *924684 connect() failed (110: Connection timed out) while connecting to upstream, client: 172.29.XX.XX, server: _, request: "GET /example1/model/v2/4SBWFWMMFWKWDWFS178S94DFDE/imageurl HTTP/1.1", upstream: "https://XX.XX.XX.XX:443/example1/model/v2/4SBWFWMMFWKWDWFS178S94DFDE/imageurl", host: "myapp.example.com"
> 
> 2019/06/10 13:55:20 [error] 28423#0: *492252 no live upstreams while connecting to upstream, client: 172.29.XX.XX, server: _, request: "GET /example1/model/v2/4SBWFWMMFWKWDWFS178S94DFDE/imageurl HTTP/1.1", upstream: "https://XX.XX.XX.XX:443/example1/model/v2/4SBWFWMMFWKWDWFS178S94DFDE/active", host: " myapp.example.com "
> 
> I have already tried to made many changes in nginx.conf file, below is showing complete conf file details. On restart or reload nginx service, issue is resolved. But this is not the permanent solution.

The "connect() failed" errors indicate that your backend can't 
cope with load, and hence nginx disables it for fail_timeout time, 
10 seconds by default.

Generally this indicate you have to add more backend servers to 
cope with the load.

If you want to configure nginx to be more tolerant to upstream 
errors, you can do so using the max_fails and fail_timeout 
parameters, see here for details:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_fails
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#fail_timeout

[...]

> eInfochips Business Disclaimer: This e-mail message and all 
> attachments transmitted with it are intended solely for the use 
> of the addressee and may contain legally privileged and 
> confidential information. If the reader of this message is not 
> the intended recipient, or an employee or agent responsible for 

You may want to avoid such disclaimers when posting to to a public 
mailing list.  Thank you.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list