<div dir="ltr">кеш используется ?</div><div class="gmail_extra"><br><div class="gmail_quote">13 сентября 2017 г., 19:07 пользователь ingtar <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> написал:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Добрый день! Такая непонятная штука стала происходить (время появления не<br>
зафиксировали)<br>
Есть nginx в котором:<br>
worker_processes 28;<br>
worker_rlimit_nofile 20000;<br>
<br>
В случае выполнения nignx reload старые ооочень долго не завершаются.<br>
Настройка worker_shutdown_timeout 1m выставлена, но особо не помогает.<br>
Через какое-то время появляются ошибки Too many open files. Если посмотреть<br>
по открытым файлам для каждого процесса то картина следующая:<br>
<br>
несколько<br>
nginx: worker process<br>
Limit Soft Limit Hard Limit Units<br>
<br>
Max open files 20000 20000 files<br>
<br>
pid 43587<br>
Currently open files: 12510<br>
<br>
и очень много:<br>
<br>
nginx: worker process is shutting down<br>
Limit Soft Limit Hard Limit Units<br>
<br>
Max open files 15240 15240 files<br>
<br>
pid 35319<br>
Currently open files: 217<br>
<br>
nginx: worker process is shutting down<br>
Limit Soft Limit Hard Limit Units<br>
<br>
Max open files 15240 15240 files<br>
<br>
pid 35311<br>
Currently open files: 223<br>
<br>
Если посмотреть список процессов, то видно что нормальных воркеров мало, у<br>
каждого перекос по файлам и такие ошибки.<br>
<br>
nobody 1752 18.0 5.2 2752480 1712492 ? S 18:40 4:13 nginx:<br>
worker process is shutting down<br>
nobody 6034 36.3 5.2 2752480 1740768 ? S 17:38 30:45 nginx:<br>
worker process is shutting down<br>
nobody 6035 8.1 4.2 2752480 1399368 ? S 17:38 6:54 nginx:<br>
worker process is shutting down<br>
nobody 6040 5.4 4.1 2752480 1359280 ? S 17:38 4:35 nginx:<br>
worker process is shutting down<br>
nobody 6049 12.5 4.6 2752480 1539268 ? S 17:38 10:35 nginx:<br>
worker process is shutting down<br>
nobody 6050 31.3 5.2 2752480 1739804 ? S 17:38 26:31 nginx:<br>
worker process is shutting down<br>
nobody 6052 3.3 4.0 2752480 1343572 ? S 17:38 2:51 nginx:<br>
worker process is shutting down<br>
nobody 6054 5.3 4.1 2752480 1360352 ? S 17:38 4:33 nginx:<br>
worker process is shutting down<br>
nobody 6055 26.2 5.4 2752480 1790544 ? S 17:38 22:13 nginx:<br>
worker process is shutting down<br>
nobody 6058 0.0 3.7 2752480 1227076 ? S 17:38 0:03 nginx:<br>
cache manager process<br>
root 6168 0.0 3.9 2752480 1293176 ? Ss 13:24 0:16 nginx:<br>
master process /usr/sbin/nginx -g daemon on; master_process on;<br>
nobody 10656 48.4 5.2 2752480 1719536 ? S 18:45 8:36 nginx:<br>
worker process is shutting down<br>
nobody 10657 31.1 4.4 2752480 1460292 ? S 18:45 5:31 nginx:<br>
worker process is shutting down<br>
nobody 10658 70.8 5.2 2752480 1739444 ? R 18:45 12:33 nginx:<br>
worker process<br>
nobody 10659 70.7 5.2 2752480 1739476 ? R 18:45 12:32 nginx:<br>
worker process<br>
nobody 10660 10.7 4.1 2752480 1377328 ? S 18:45 1:54 nginx:<br>
worker process is shutting down<br>
nobody 11053 25.3 4.3 2752480 1440108 ? S 18:45 4:26 nginx:<br>
worker process is shutting down<br>
nobody 11054 51.3 5.3 2752480 1756036 ? S 18:45 8:59 nginx:<br>
worker process is shutting down<br>
nobody 11055 2.2 4.0 2752480 1324696 ? S 18:45 0:23 nginx:<br>
worker process is shutting down<br>
nobody 11056 38.6 4.8 2752480 1604476 ? S 18:45 6:45 nginx:<br>
worker process is shutting down<br>
nobody 11057 17.9 4.2 2752480 1400344 ? S 18:45 3:07 nginx:<br>
worker process is shutting down<br>
nobody 16049 9.6 4.1 2752480 1373540 ? S 18:48 1:26 nginx:<br>
worker process is shutting down<br>
nobody 19782 29.2 5.4 2752480 1784320 ? S 18:18 13:08 nginx:<br>
worker process is shutting down<br>
nobody 29881 7.8 4.7 2752480 1571664 ? S 18:24 3:06 nginx:<br>
worker process is shutting down<br>
nobody 32145 22.2 5.3 2752480 1757248 ? S 17:53 15:40 nginx:<br>
worker process is shutting down<br>
nobody 33168 19.8 5.3 2752480 1748384 ? S 18:25 7:33 nginx:<br>
worker process is shutting down<br>
nobody 36049 94.5 5.1 2752480 1702212 ? R 18:59 3:29 nginx:<br>
worker process<br>
nobody 40384 14.9 4.1 2489628 1365948 ? S 16:22 24:07 nginx:<br>
worker process is shutting down<br>
root 43195 0.0 0.0 13956 2188 pts/0 S+ 19:03 0:00 grep<br>
--color=auto nginx<br>
nobody 45130 22.6 5.2 2752480 1715320 ? S 18:32 6:58 nginx:<br>
worker process is shutting down<br>
nobody 48277 3.8 4.1 2489628 1369324 ? S 16:58 4:48 nginx:<br>
worker process is shutting down<br>
nobody 49924 6.1 4.2 2489628 1411852 ? S 16:59 7:37 nginx:<br>
worker process is shutting down<br>
nobody 49931 2.7 4.1 2489628 1368808 ? S 16:59 3:22 nginx:<br>
worker process is shutting down<br>
nobody 49943 8.3 4.4 2489628 1453684 ? S 16:59 10:18 nginx:<br>
worker process is shutting down<br>
nobody 49944 9.1 4.3 2489628 1444924 ? S 16:59 11:18 nginx:<br>
worker process is shutting down<br>
nobody 49945 3.8 4.3 2489628 1436344 ? S 16:59 4:46 nginx:<br>
worker process is shutting down<br>
nobody 50490 8.6 5.3 2752480 1768892 ? S 18:35 2:25 nginx:<br>
worker process is shutting down<br>
nobody 55442 24.4 5.3 2752480 1753424 ? S 18:38 6:02 nginx:<br>
worker process is shutting down<br>
<br>
Версия nignx 1.12.1 собрана так:<br>
<br>
nginx version: nginx/1.12.1<br>
built by gcc 4.9.2 (Debian 4.9.2-10)<br>
built with OpenSSL 1.0.2j 26 Sep 2016 (running with OpenSSL 1.0.2i 22 Sep<br>
2016)<br>
TLS SNI support enabled<br>
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx<br>
--conf-path=/etc/nginx/nginx.<wbr>conf --error-log-path=/var/log/<wbr>nginx/error.log<br>
--http-log-path=/var/log/<wbr>nginx/access.log --pid-path=/run/nginx.pid<br>
--lock-path=/run/lock/nginx.<wbr>lock<br>
--http-client-body-temp-path=/<wbr>run/shm/body_temp<br>
--http-proxy-temp-path=/run/<wbr>shm/proxy_temp<br>
--http-fastcgi-temp-path=/run/<wbr>shm/fastcgi_temp<br>
--http-uwsgi-temp-path=/run/<wbr>shm/uwsgi_temp<br>
--http-scgi-temp-path=/run/<wbr>shm/scgi_temp --with-http_ssl_module<br>
--with-http_realip_module --with-http_sub_module --with-http_dav_module<br>
--with-http_gunzip_module --with-http_gzip_static_module<br>
--with-http_stub_status_module --with-mail --with-http_v2_module<br>
--with-http_geoip_module --with-select_module<br>
--with-http_auth_request_<wbr>module --with-poll_module --with-debug<br>
<br>
Встречалось ли такое?<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?21,276356,276356#msg-276356" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?21,276356,276356#msg-<wbr>276356</a><br>
<br>
______________________________<wbr>_________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-ru</a></blockquote></div><br></div>