# Help decipher error message "upstream prematurely closed connection while reading response header fr

**URL:** <https://www.ruby-forum.com/t/help-decipher-error-message-upstream-prematurely-closed-connection-while-reading-response-header-fr/136508>\
**Category:** NGINX\
**Created:** [May 2, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/help-decipher-error-message-upstream-prematurely-closed-connection-while-reading-response-header-fr/136508 "2008-05-02T21:06:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [May 2, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/help-decipher-error-message-upstream-prematurely-closed-connection-while-reading-response-header-fr/136508/1 "2008-05-02T21:06:44Z")

</div>

Anyone got any idea what this error means?

2008/05/02 11:38:31 [error] 5505#0: \*357728 upstream prematurely  
closed connection while reading response header from upstream, client:  
69.212.152.80, server: [tanga.com](http://tanga.com), URL:  
“/puzzles/847-5-1-2008?comments\_page=1#comment\_188860”, upstream:  
“[http://10.7.217.165:9013/puzzles/847-5-1-2008?comments\_page=1#comment\_188860](http://10.7.217.165:9013/puzzles/847-5-1-2008?comments_page=1#comment_188860)”,  
host: “[www.tanga.com](http://www.tanga.com)”, referrer:  
“[http://www.tanga.com/comments/188860/edit](http://www.tanga.com/comments/188860/edit)”

I’m not sure what the error message means, or where to look to debug it.

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![joe-dumoulin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Post date:** [May 3, 2008, 6:57am UTC](https://www.ruby-forum.com/t/help-decipher-error-message-upstream-prematurely-closed-connection-while-reading-response-header-fr/136508/2 "2008-05-03T06:57:33Z")

</div>

Your upstream, the server that nginx is proxying for closed the  
connection before sending a response back to nginx.

I’ll take a guess that this is a rails app, and the upstream server is  
mongrel, turn on the mongrel debug log (kill -USR1 ?) and see if you  
can replicate the problem.

Cheers

Dave
