First of all I want to explain what I am using the server for.
This server is used to deliver downloadable files. Specially video games which I upload to the server and then users can download it through form action. Below is the link to the source where the download file is requested.
The problem I am facing is that I have Intel Core i7 8 Cores 12 GB Ram dedicated server. And whenever I let my users download files through the server it starts generating high load average and the server is then unable to fetch downloads through the PHP pages that I created it for.
I have also attached my Nginx.conf
and other screenshots so do check them out.
And one more thing: whenever I restart my nginx its gets ultra fast despite the load average but then again slows down after a minute.
You can check here this is the source where the download file is requested
worldofpcgames.net/fairy-fencer-f-advent-dark-force-free-download/
HERE IS MY NGINX->
user nginx;
worker_processes 8;
worker_rlimit_nofile 5000;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 3000;
use epoll;
multi_accept on;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /mnt/www/html;
index index.php;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /protected {
root /mnt/www/html;
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri$remote_addr enigma";
if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 410; }
error_page 403 /blocked.html;
}
}
# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl http2 default_server;
# listen [::]:443 ssl http2 default_server;
# server_name _;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# location / {
# }
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }
}
And HERE IS THE NGINX error log ->
And one more thing i havent configured my PHP or Mysql at all. I just installed them and did the basic settings such as changed the user and owner group to nginx. and listen
HERE are the screenshot of TOP->
And i am on Centos7
So please help me out
Sorry here is the nginx.conf couldn't link above because I don't have reputation points
https://drive.google.com/open?id=0ByamFYoTQ6KRRFpnUWJ3VGNxUEE
Best Answer
The problem is your disk
iowait
(sdc). Look at the red lines of your screen shot calledatop -c
. This would cause high load average but low cpu usage. What is your lvm configuration?update: @MichaelHampton pointed this out before me, in the comments.