Lots of 'client timed out' messages

Hi all,
I just started using nginx, and I wanted to thank Igor and the other
devs for nginx.

I’m using nginx as a reverse proxy to my backends. I’m monitoring my
logs and I am unable to explain a few things I see there:

  1. 2008/10/03 11:35:54 [info] 5631#0: *1416613 client timed out (110:
    Connection timed out) while reading client request line, client:
    x.x.x.x , server: example.com

I see a lot of these messages, and not clear what’s the reason behind
this. I skimmed thro’ the source, but its being generated from
multiple places, so I’m not sure. I find it hard to believe that so
many clients would open connections and not send (or partially send)
data/headers.

  1. 2008/10/02 19:45:01 [info] 5289#0: *24271 client timed out (110:
    Connection timed out) while sending to client,…

I see a few of these. The file being transferred here is about 150k.
Not sure why the timeout again.

  1. What exactly does the ‘keepalive_timeout’ directive mean? Is it the
    ‘idle’ time after which if there is no data the connection is closed
    (similar to server.max-keep-alive-idle to those of you who know
    lighty) or is it just the time after which the connection is closed.

  2. I have a couple of big files (about 300k) being sent by the
    backend. What would be a good setting for the proxy_buffers directive
    to avoid intermediate temp files? I see a few of these: “2008/10/03
    11:45:43 [warn] 5628#0: *1476309 an upstream response is buffered to a
    temporary file”

I am attaching part of my conf file. System config: Ubuntu 6.06 on
Intel Xeon Quad Core (32 bit), 2G RAM.


keepalive_timeout 75;

location / {
proxy_pass http://backend;
proxy_set_header X-Forwarded-For $remote_addr;

        proxy_read_timeout  120;

        proxy_buffers 32 4K;

}

I have no other timeout directives set.

Any help would be appreciated. Thanks!

-Praveen