Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When first visiting my site after not visiting it for a few minutes, the connection is "reset" 100% of the time.

I get this message when debug is turned on, along with a 400 bad request status message:

client prematurely closed connection while reading client request line

I've read that this could be caused by large_client_header_buffers setting. I have google analytics on my site. Using live http headers, I get this as the request:

`GET /__utm.gif?utmwv=5.3.7&utms=35&utmn=745612186& HTTP/1.1

my large_client_header_buffers in nginx is set to 4 8k, so I don't know if this is the problem. Immediate requests have the first "reset" request are all successful.

share|improve this question

In most cases 400 status in access logs like this: - - [09/Nov/2012:16:01:01 +0000] "-" 400 0 "-" "-"

and the message

... [info] ... client prematurely closed connection while reading client request line ...

in nginx error logs is a result of a browser opening extra connection to nginx and closing it without sending any request into it. It is often seen when client's browser is Chrome and there isn't many resources to load on the page requested.

By itself these messages are harmless and not a problem (and that's why the logging level is info). If you see some problem along with these messages - you may want to elaborate more on the problem you have. If you just see the messages - don't be scared, they are harmless.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.