nginx high load average

iLinux85 nginx-forum at nginx.us
Wed Jan 30 17:43:46 UTC 2013


this is a shared server like any other shared sites support download and
upload files like movies and programs , stuff over 1 and 2 gigabyte for
download and upload , i am trying to adjust the connections in the server to
work good with nginx , and this is my vhost.conf

high connection mean alot of visitors established connection in my server 

      4 TIME_WAIT
      9 SYN_RECV
      2 LISTEN
     40 LAST_ACK
    988 ESTABLISHED

and this is vhost.conf


   server {

  access_log off;

  error_log  logs/vhost-error_log warn;
  listen    80;
  server_name  site.com www.site.com;

  # uncomment location below to make nginx serve static files instead of
Apache
  # NOTE this will cause issues with bandwidth accounting as files wont be
logged
  location
~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$
{
  root   /home3/s9/public_html;
  }

  location / {
   proxy_send_timeout   90;
   proxy_read_timeout   90;

   proxy_buffer_size    4k;
   # you can increase proxy_buffers here to suppress "an upstream response
   #  is buffered to a temporary file" warning
   proxy_buffers     16 32k;
   proxy_busy_buffers_size 64k;
   proxy_temp_file_write_size 64k;

   proxy_connect_timeout 30s;

   proxy_redirect  http://www.site.com:81   http://www.site.com;
   proxy_redirect  http://site.com:81   http://site.com;

   proxy_pass   http://192.168.0.1:81/;

   proxy_set_header   Host   $host;
   proxy_set_header   X-Real-IP  $remote_addr;
   proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

            # track uploads in the 'proxied' zone
            # remember connections for 30s after they finished
            track_uploads proxied 30s;
  }
        location ^~ /progress {
            # report uploads tracked in the 'proxied' zone
            report_uploads proxied;
        }
 }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,235709,235745#msg-235745



More information about the nginx mailing list