Welcome! Log In Create A New Profile

Advanced

Re: nginx перестает отвечать нагружая IO на 100%

January 28, 2015 10:34PM
А как вообще выглядит график загрузки IO?

Наблюдал что-то похожее на хостинге, где с нагрузкой не справлялась СХД.

2015-01-28 22:47 GMT+03:00 iprok <nginx-forum@nginx.us>:

> Есть сервер с несколькими десятками сайтов на Debian Wheezy amd64. nginx
> 1.6.2 отсюда
> deb http://nginx.org/packages/debian/ wheezy nginx
>
> Симптоматика следующая. Сначала приходит письмо от заббикса о превышение
> порога IO:
> CPU iowait time (hostname:system.cpu.util[,iowait]): 24.95 %
>
> Через несколько секунд перестают отвечать все сайты. nginx становится
> недоступен. Смотрю iotop, все процессы nginx выглядят так (disk read, disk
> write, swap in, io):
>
> 0.00 B/s 0.00 B/s 0.00 % 99.99 % nginx: worker process
>
> Честно говоря совершенно загадочная для меня ситуация, чтоб IO было
> большое,
> но ни записи ни чтения не происходило. Что это может быть? В error.log
> ничего за этот период нет. Вообще в логах не вижу ничего криминального.
> Места везде с запасом.
> По памяти:
> free -m
> total used free shared buffers cached
> Mem: 8002 7869 132 0 476 6001
> -/+ buffers/cache: 1392 6610
> Swap: 8191 0 8191
>
> nginx.conf:
>
> user nginx;
> worker_processes 4;
> worker_rlimit_nofile 200000;
>
> error_log /var/log/nginx/error.log error;
>
> events {
> worker_connections 100000;
> # use epoll;
> }
>
> http {
> include /etc/nginx/mime.types;
> default_type application/octet-stream;
> server_names_hash_max_size 2048;
> server_names_hash_bucket_size 64;
>
> server_tokens off;
>
> ssl_session_cache shared:SSL:10m;
> ssl_session_timeout 10m;
>
> proxy_cache_path /var/cache/nginx keys_zone=one:50m;
> limit_req_zone $binary_remote_addr zone=agency:1m rate=20r/m;
> limit_req_zone $binary_remote_addr zone=a7:1m rate=3r/s;
> limit_req_zone $binary_remote_addr zone=default:1m rate=10r/s;
> limit_req_zone $binary_remote_addr zone=global:10m rate=500r/s;
> limit_req zone=global burst=500;
> log_format main '$remote_addr - $remote_user [$time_local] "$request"
> '
> '$status $body_bytes_sent "$http_referer" '
> '"$http_user_agent"';
> log_format proxy '$http_host == $remote_addr - $remote_user
> [$time_local] "$request"'
> '$status $body_bytes_sent "$http_referer" ';
>
> log_format global '$http_host == $remote_addr - $remote_user
> [$time_local] "$request" '
> '$status $body_bytes_sent "$http_referer"
> "$http_user_agent" ';
> sendfile on;
> tcp_nopush on;
> tcp_nodelay on;
> keepalive_timeout 60;
> gzip on;
> gzip_types text/css application/x-javascript;
> gzip_vary on;
>
> reset_timedout_connection on;
>
> proxy_redirect off;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header Connection close;
> proxy_set_header Range "";
>
> proxy_pass_header Content-Type;
> proxy_pass_header Last-Modified;
> proxy_pass_header Expires;
>
> client_max_body_size 50m;
> large_client_header_buffers 16 16k;
> client_body_buffer_size 256k;
>
> proxy_connect_timeout 90;
> proxy_send_timeout 90;
> proxy_read_timeout 300;
>
>
> proxy_buffer_size 64k;
> proxy_buffers 16 64k;
> proxy_busy_buffers_size 64k;
> proxy_temp_file_write_size 64k;
>
> access_log /var/log/nginx/access.log global buffer=8k;
>
>
> server {
> listen <serverip>:80 default_server;
> return 444;
> }
> server {
> listen 127.0.0.1:80 default_server;
> location /nginx_status {
> stub_status on;
> access_log off;
> }
> }
> include sites-enabled/*;
> include deploy-enabled/*;
> }
>
> В настройках виртуальных хостов никаких особенных настроек нет: location,
> root, access_log, error_log, proxy_pass.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,256316,256316#msg-256316
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru




--
Best regards, Juriy Strashnov

Mob. +7 (953) 742-1550
E-mail: j.strashnov@me.com

Please consider the environment before printing this email.
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

nginx перестает отвечать нагружая IO на 100%

iprok January 28, 2015 02:47PM

Re: nginx перестает отвечать нагружая IO на 100%

foboss January 28, 2015 10:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready