# Weird proxy pass timeout

**URL:** <https://www.ruby-forum.com/t/weird-proxy-pass-timeout/222359>\
**Category:** NGINX\
**Created:** [August 27, 2012, 2:00pm UTC](https://www.ruby-forum.com/t/weird-proxy-pass-timeout/222359 "2012-08-27T14:00:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 27, 2012, 2:00pm UTC](https://www.ruby-forum.com/t/weird-proxy-pass-timeout/222359/1 "2012-08-27T14:00:47Z")

</div>

Hi,

I have an nginx server proxying traffic to a java app server (they are  
on separate machines). I will be giving the configuration below, but  
just to summarize the problem I am getting a

“2012/08/23 21:25:09 [error] 1798#0: \*61949 upstream timed out (110:  
Connection timed out) while connecting to upstream, client: …”

after 60 seconds from NGINX couple of times a day.

The weird thing is that I check the corresponding log entry on the  
other side (java app server), and it looks like the request is  
completed successfully on the java server side and the response was  
prepared super fast (a few ms) since this was a heavily cached  
content. BTW, traffic is really really low on both NGINX and java  
server (like 1 req every 30 seconds or so), so it is not about worker  
threads, number of processes, or any other congestion related issue,  
etc…

Can you guys please provide any idea about what / how to debug? Since  
Java side is super fast and I am getting this every once in a while, I  
am really puzzled by this.

Thanks in advance…

BTW, my nginx configuration:

upstream appservers {  
server X.X.X.X:5000;  
}

```
    location / {
            proxy_pass http://appservers;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For

```

$proxy\_add\_x\_forwarded\_for;  
proxy\_set\_header Host $http\_host;  
proxy\_set\_header x-forwarded-proto $scheme;  
}
