# Occasional truncated responses with nginx+passenger

**URL:** <https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234>\
**Category:** NGINX\
**Created:** [July 26, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234 "2010-07-26T19:41:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 26, 2010, 7:41pm UTC](https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234/1 "2010-07-26T19:41:57Z")

</div>

Heya,  
I’m having problems with our nginx setup (nginx 0.7.67 -\> passenger  
2.2.15 -\> rails 2.3.6, all running on Solaris 5.11). Most requests  
are fine, but occasionally - maybe every 1 in 50 - I get a truncated  
response.

I set up a test script that repeatedly requests a page that’s 22kb  
long. Every so often I get a truncated response body, truncated to a  
multiple of 5KB - usually 15kb. The header content length still  
indicates 22kb, but only 15kb are transferred according to the  
access.log.

I wrote some Rack middleware to at least check that the responses  
coming out of Rails were sane, which leaves nginx and/or passenger.  
Any suggestions on tracing it further?

-Jonathan

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 26, 2010, 7:44pm UTC](https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234/2 "2010-07-26T19:44:17Z")

</div>

On Mon, Jul 26, 2010 at 06:40:44PM +0100, Jonathan del Strother wrote:

> access.log.
> 
> I wrote some Rack middleware to at least check that the responses  
> coming out of Rails were sane, which leaves nginx and/or passenger.  
> Any suggestions on tracing it further?

Is anything in nginx error\_log ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 26, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234/3 "2010-07-26T23:30:15Z")

</div>

On 26 July 2010 18:40, Jonathan del Strother [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> access.log.
> 
> I wrote some Rack middleware to at least check that the responses  
> coming out of Rails were sane, which leaves nginx and/or passenger.  
> Any suggestions on tracing it further?

I got a response from one of the Phusion guys - apparently it’s a  
kernel bug in Solaris when using Ruby 1.8. So I guess nginx is off  
the hook for this one 🙂

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 26, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/occasional-truncated-responses-with-nginx-passenger/192234/4 "2010-07-26T19:47:13Z")

</div>

Nope, not even with a debug log level & passenger\_log\_level 3.
