"client closed prematurely connection..."

#1

About 15% of my requests are hanging and the nginx error log outputs:

*5 client closed prematurely connection, so upstream connection is
closed too while sending request to upstream

At this point I’m not sure what the problem is. Nginx? Mongrel? Some
code causing Rails to quit? Any ideas?

#2

On Nov 5, 2007 6:58 PM, Adam R. removed_email_address@domain.invalid wrote:

About 15% of my requests are hanging and the nginx error log outputs:

*5 client closed prematurely connection, so upstream connection is
closed too while sending request to upstream

At this point I’m not sure what the problem is. Nginx? Mongrel? Some
code causing Rails to quit? Any ideas?

It is possible that the Mongrels are getting more requests than they
can handle in which case they simply close the connection. I’m not
saying this is what is happening but you should make sure that you
have enough running to handle the load. Other than that I am unsure.

Good luck,

~Wayne

#3

On Tue, Nov 06, 2007 at 12:58:59AM +0100, Adam R. wrote:

About 15% of my requests are hanging and the nginx error log outputs:

*5 client closed prematurely connection, so upstream connection is
closed too while sending request to upstream

At this point I’m not sure what the problem is. Nginx? Mongrel? Some
code causing Rails to quit? Any ideas?

You see the hanging requests in browser ? Try

proxy_ignore_client_abort on;
fastcgi_ignore_client_abort on;

#4

Igor S. a e’crit :

You see the hanging requests in browser ? Try

proxy_ignore_client_abort on;
fastcgi_ignore_client_abort on;

Hello,
Can you be more specific on this options ? There isn’t any description
in the english documentation.

Does it prevent aborting request to upstream proxys and fastcgis in case
the client itself aborts the request ?

#5

On Wed, Nov 14, 2007 at 11:03:24AM +0100, Jean-Philippe wrote:

code causing Rails to quit? Any ideas?
Can you be more specific on this options ? There isn’t any description
in the english documentation.

Does it prevent aborting request to upstream proxys and fastcgis in case
the client itself aborts the request ?

Yes.

#6

Igor S. a e’crit :

fastcgi_ignore_client_abort on;

Yes.

Thanks, I’ll add it to the documentation.