optimization - NGINX For 100K+ R/S -


i trying tune nginx insane amounts of traffic.

i have huge dedicated server , website keeps going down during times of high traffic.

although when check top, see no cpu usage.

how can increase amount of cpu nginx uses?

here current nginx configuration

user www-data; worker_processes 16; worker_rlimit_nofile 819200; pid /var/run/nginx.pid;   events {     worker_connections 161920;     # multi_accept on;     use epoll;     multi_accept on; }  http { # set client body size 2m # client_max_body_size 2m;     ##     # basic settings     ##      sendfile on;     tcp_nopush on;     tcp_nodelay on;     keepalive_timeout 15;     types_hash_max_size 8096;     # server_tokens off;      server_names_hash_bucket_size 256;     # server_name_in_redirect off;      include /etc/nginx/mime.types;     default_type application/octet-stream;      ##     # logging settings     ##      access_log /var/log/nginx/access.log;     error_log /var/log/nginx/error.log;      ##     # gzip settings     ##      gzip on;     gzip_disable "msie6";      # gzip_vary on;     # gzip_proxied any;     # gzip_comp_level 6;     # gzip_buffers 16 8k;     # gzip_http_version 1.1;     # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;      ##     # nginx-naxsi config     ##     # uncomment if installed nginx-naxsi     ##      #include /etc/nginx/naxsi_core.rules;      ##     # nginx-passenger config     ##     # uncomment if installed nginx-passenger     ##      #passenger_root /usr;     #passenger_ruby /usr/bin/ruby;      ##     # virtual host configs     ##      include /etc/nginx/conf.d/*.conf;     include /etc/nginx/sites-enabled/*; }   #mail { #   # see sample authentication script at: #   # http://wiki.nginx.org/imapauthenticatewithapachephpscript #  #   # auth_http localhost/auth.php; #   # pop3_capabilities "top" "user"; #   # imap_capabilities "imap4rev1" "uidplus"; #  #   server { #       listen     localhost:110; #       protocol   pop3; #       proxy      on; #   } #  #   server { #       listen     localhost:143; #       protocol   imap; #       proxy      on; #   } #} 

if have more 16 cores can increase worker_process. check out: https://www.nginx.com/blog/tuning-nginx/

however, sure it's crashing out due cpu utilization , not ram or else (like maybe application)? make sure check error log , collect metrics because i'd surprised (especially based on said) if had cpu load. recommend munin (http://munin-monitoring.org) collect solid metrics , try better figure out what's going on.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -