nginx as Loadbalancer loading page somtimes not complete

misael zen at
Thu Feb 26 06:59:48 MSK 2009

hi nginx users,

first of all i like to thank you for this great application,
i recently used nginx for my community  forum  backend with vbulletin, 
and the average user online are 10.000 users.
the problems was, sometimes our visitor can't load the page 
(post/thread) at full page.
i use -RELEASE FreeBSD 7.0-RELEASE with dual Quad 2 core processors and 
and here  is my nginx.conf:

user  www;
worker_processes  4;
worker_rlimit_nofile 200000;
error_log  /var/log/error.log warn;

events {
    worker_connections  102400;
    use kqueue;

http {

    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    sendfile        on;
    tcp_nopush     on;
        client_header_timeout          10m;
        client_body_timeout                    10m;
        send_timeout                           10m;
        connection_pool_size            256;
        client_header_buffer_size       1k;
        large_client_header_buffers     4 8k;
        request_pool_size                       4k;
        ignore_invalid_headers          on;

    reset_timedout_connection on;
    keepalive_timeout  0;
    tcp_nodelay on;
    gzip  on;
    gzip_proxied any;
    gzip_vary on;
    gzip_comp_level 9;
    gzip_min_length 1100;
    gzip_http_version 1.0;
    gzip_buffers 4 8k;
    gzip_types text/plain text/html text/css application/x-javascript 
text/xml application/xml application/xml+rss text/javascript;
    output_buffers 1 32k;
    postpone_output 1460;

   server_names_hash_max_size 4096;
   server_names_hash_bucket_size 128;

   upstream foobar {
        server; #weight=1;  # pong6
        server; #weight=2;  # web1
        server; #weight=2;   # web2
        server; #weight=1;   # web4
        server; #weight=2;   # web5

    server {
        listen  80 default rcvbuf=8192 sndbuf=16384;
        client_max_body_size       50m;


        if ($host = ""){
        rewrite ^(.*)$$1 permanent;

        error_page  404              /404.html;

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/local/www/nginx-dist;

           location ~ "^/" {
           index  index.php index.htm index.html;
            proxy_ignore_client_abort   on;
            proxy_buffering     on;
            proxy_next_upstream timeout;
           client_max_body_size       10m;
            client_body_buffer_size    1024k;
            proxy_connect_timeout       75;
            proxy_read_timeout          300;
            proxy_buffer_size          256k;
            proxy_buffers              128 256k;
            proxy_busy_buffers_size    512k;
            proxy_temp_file_write_size 1024k;
            proxy_redirect     off;
            proxy_set_header    Host             $host;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            proxy_pass  http://foobar;


and there were no error log regarding this problem,

only these few warn msg (which i'm not sure what does it mean)


2009/02/26 10:44:39 [warn] 99639#0: *6265776 a client request body is 
buffered to a temporary file /var/tmp/nginx/client_body_temp/0000000000 
while sending request to upstream, client:, server:, request: "POST /newreply.php?do=postreply&t=866095 HTTP/1.1", 
upstream: "", 
host: "", referrer: 
"", server:, request: "POST 
/ajax.php?do=verifyusername HTTP/1.1", upstream: 
"", host: 
"", referrer: ""

i need to find the solution for this problem,
and i hope all the nginx gurus here would be so kind enough to help me

and sorry for my poor english




This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. 
Any views or opinions expressed are solely those of the author and do not necessarily represent those of the company.
If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
Please contact the system manager if you believe you have received this email in error.
Finally, the recipient should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus transmitted by this email.

More information about the nginx mailing list