ngin goes down under high traffic

David Pospisil foton2 at post.cz
Sun Nov 16 21:19:17 MSK 2008


Please look at http://pub.horror.superhosting.cz/data/eth0-6h.png.
Everytime nginx goes under high traffic, it stops offering files and instead of
this, it starts reading of discs (it reads about 400Mb/s but send nothing). I
have to restart nginx then. 
Linux Debian etch 2.6.24, nginx 0.6.32,
nginx.conf:
user www-data;
worker_processes  64;

error_log  /var/log/nginx/error.log debug;
pid        /var/run/nginx.pid;

events {
    worker_connections  2048;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    access_log	/var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;

    include /etc/nginx/sites-enabled/*;

}

# You may add here your
# server {
#       ...
# }
# statements for each of your virtual hosts

server {
        listen   xx.89.xx.xx:80;
        server_name  free.xx.com;

        access_log  "/home/logs/free/nginx_access.log";
	error_log   "/home/logs/free/nginx_error.log" info;

        location / {
                root   "/home/www/xx.com/free";
                index  index.html index.htm;
		rewrite "^/(.*)" "/index.php?cgi_download_uri=$1" last;
	}

	location /storage/ {
 		  internal;
		  alias /storage/;
	}

        #error_page  404  /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /var/www/nginx-default;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        location ~ \.php$ {
	         proxy_pass   http://127.0.0.1;
		 proxy_set_header  X-Real-IP  $remote_addr;
	         proxy_set_header  Host  $host;
                 proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for; 
		 proxy_buffering off;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
                #deny  all;
        #}
}

Thank you for any suggestion.






More information about the nginx mailing list