# Upstream timed out

**URL:** <https://www.ruby-forum.com/t/upstream-timed-out/235734>\
**Category:** NGINX\
**Created:** [July 11, 2013, 6:43pm UTC](https://www.ruby-forum.com/t/upstream-timed-out/235734 "2013-07-11T18:43:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [July 11, 2013, 6:43pm UTC](https://www.ruby-forum.com/t/upstream-timed-out/235734/1 "2013-07-11T18:43:39Z")

</div>

I am a newbie.

I’m running Ubuntu, Nginx and 5 Thin servers - that serve up a Ruby on  
Rails  
app.

The system hangs about once a day.

The Nginx log has this error:  
2013/07/11 10:06:46 [error] 21344#0: \*201 upstream timed out (110:  
Connection timed out) while reading response header from upstream,  
client:  
192.168.10.11, server: ,

and

2013/07/11 10:05:11 [warn] 21345#0: \*225 an upstream response is  
buffered to  
a temporary file /opt/bitnami/nginx/tmp/proxy/2/00/0000000002 while  
reading  
upstream, client: 192.168.10.11, server: , request: “GET  
/assets/application-b7b1695e978934a03ade49d20bf63139.js HTTP/1.1”,  
upstream:

Is this telling me there is a problem with Thin or Ruby on Rails?  
I’m not seeing error in logs for those systems.

Thanks,  
Reddirt

Posted at Nginx Forum:

> **[upstream timed out](https://forum.nginx.org/read.php?2,240762,240762#msg-240762)**
>
> I am a newbie. I'm running Ubuntu, Nginx and 5 Thin servers - that serve up a Ruby on Rails app. The system hangs about once a day. The Nginx log has this error: 2013/07/11 10:06:46 \[error\] 21344#0: \*201 upstream timed out (110: Connection timed ou

---

<div class="post-metadata">

**Author:** ![reddirt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e99b99/32.png) [@reddirt](https://www.ruby-forum.com/u/reddirt)\
**Post date:** [July 12, 2013, 12:21am UTC](https://www.ruby-forum.com/t/upstream-timed-out/235734/2 "2013-07-12T00:21:57Z")

</div>

On Thu, Jul 11, 2013 at 12:43:06PM -0400, Reddirt wrote:

Hi there,

> The Nginx log has this error:  
> 2013/07/11 10:06:46 [error] 21344#0: \*201 upstream timed out (110:  
> Connection timed out) while reading response header from upstream, client:  
> 192.168.10.11, server: ,

That says that as far as nginx is concerned, its upstream (presumably  
a Thin server) took too long before returning useful content. That  
suggests a problem on that Thin server, or with the “timeout” values  
that nginx and Thin have being different.

> 2013/07/11 10:05:11 [warn] 21345#0: \*225 an upstream response is buffered to  
> a temporary file /opt/bitnami/nginx/tmp/proxy/2/00/0000000002 while reading  
> upstream, client: 192.168.10.11, server: , request: “GET  
> /assets/application-b7b1695e978934a03ade49d20bf63139.js HTTP/1.1”,  
> upstream:

That just says that the response was too big to fit in nginx’s memory  
buffers, and so was written to disk. Not a problem, unless you don’t  
expect the response to be that big.

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
