Timeout serving large requests

Anatoly Mikhailov anatoly at sonru.com
Wed Feb 13 16:39:59 UTC 2013


> 
>> I'm struggling to find the source of a timeout. I am running Nginx (1.2.6),
>> Passenger 3.0.18, and Rails 3.2.11. On serving one long running request, I
>> find the results (CSV file) truncated after being returned from the client.
>> The Rails application however continues to serve up the data until complete,
>> at which time it reports:
>> 
>>    Couldn't forward the HTTP response back to the HTTP client: It seems the
>> user clicked on the 'Stop' button in his browser.
>> 
>> Nginx access.log however reports a 200 for the request.
>> 
>> Some things I have tried:
>> 1) I modified the Nginx read/send timeouts in the Passenger gem
>> (ext/nginx/Configuration.c) and recompiled, with no impact.
>> 2) I ran a test of bypassing Nginx/Passenger by going direct to my app
>> running in Unicorn, and it serves up the result fine. I then took Passenger
>> out of the equation by configuring Nginx to pass the requests to Unicorn,
>> and the truncated result is back again.
>> 3) I've played with the Nginx keepalive_timeout, proxy_read_timeout,
>> proxy_send_timeout and send_timeout - all with no impact.
>> 
>> Any thoughts/advice would be much appreciated.
>> 
>> Joe
>> 
>> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236201,236201#msg-236201
>> 
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
> 
> It happened for us many times, there is only one option - upstream.
> It can be Unicorn/PassengerStandalone/whatever.
> 
> We spent a lot of time debugging Nginx, so there is no real solution 
> for passenger built-in module.
> 
> 
> Anatoly
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

You can find a lot of the same issues on Passenger bugtracker, the bug is years old.
Passenger did the great job for us and it's good to continue using it as standalone way.
But what if you want to have true Zero-downtime deployment?
Passenger provides it only with commercial paid version.

Anatoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130213/e46a96f8/attachment.html>


More information about the nginx mailing list