<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">мы за DDoS Protection<div class="">к нам ходит один и тот же сервис, пользователи напрямую не ходят</div><div class=""><br class=""></div><div class="">я просто меняю апстрим для теста</div><div class="">и наблюдаю, как кончается память и дохнет сервер</div><div class=""><br class=""></div><div class="">через 5 минут переключаюсь на прежний сервер и там всё ок<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 31 Aug 2020, at 14:35, <a href="mailto:karamba66@ukr.net" class="">karamba66@ukr.net</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Видел такой симптом когда на сервер приходит много медленных https клиентов. Посмотрите не происходит ли быстрый рост активных коннектов до больших (сотни тысяч) чисел.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">31 авг. 2020 г., в 13:11, Alexey Galygin <<a href="mailto:mif@me.com" class="">mif@me.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">у нас многое завязано на LXD, и LXC-контейнеры (особенно исторические) мы не заведём под FreeBSD,<div class="">поэтому ОС резко сменить не получится</div><div class=""><br class=""></div><div class="">хотелось бы понять: почему nginx может так активно есть всю память?</div><div class="">никогда такого не было, глаза на лоб лезут</div><div class=""><br class=""></div><div class="">он даже бедный REDIS вытеснил в своп…</div><div class=""><br class=""></div><div class="">перезапуск nginx освобождает память…<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 31 Aug 2020, at 14:00, Slawa Olhovchenkov <<a href="mailto:slw@zxy.spb.ru" class="">slw@zxy.spb.ru</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On Mon, Aug 31, 2020 at 01:51:25PM +0300, Alexey Galygin wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">привет всем<br class=""><br class="">случилось странное, переехали на сервера по параметрам в разы большие, чем сейчас (с нескромными 256 Гб RAM+ 100 Гб swap (из всех параметров влияния на штатные параметры sysctl осталось отключение ipv6 и swapness выставленный в 10%))<br class=""><br class="">через 5 минут после старта nginx ест всю память и весь swap! (см.<span class="Apple-converted-space"> </span><a href="https://prnt.sc/u8nia0" class="">https://prnt.sc/u8nia0</a><span class="Apple-converted-space"> </span><<a href="https://prnt.sc/u8nia0" class="">https://prnt.sc/u8nia0</a>>)<br class="">в итоге сервер умирает, никогда такого не видели, это же кэширующий прокси, а не БД!…<br class=""><br class="">пускаем на Ubuntu 20.04 Server LTS (5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)<br class="">нагруженный nginx 1.18 (пробовали из официальных репок ставить на хост nginx/stable 1.18.0-1~focal amd64 и в контейнер из официального докера nginx:1.18.0)<br class=""><br class="">из особенностей используются ngx_http_js_module.so — для исторического escape/unescape URI и ngx_http_image_filter_module.so — для подрезки изображений<br class=""><br class="">исключили уже всё — и zfs, который переформатировали в ext4 с отключенным atime<br class="">и из docker вынесли nginx в хост<br class=""><br class="">и внутренние системы исключили…<br class=""><br class="">меняли конфиги, отключали sendfile, кэши open-файлов, включали aio…<br class=""><br class="">упорно кончается вся память через 5 минут, все 256 Гб и своп<br class=""><br class="">идей практически не осталось, куда можно ещё копать?<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Попробовать FreeBSD?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">nginx-ru mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:nginx-ru@nginx.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">nginx-ru@nginx.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">nginx-ru mailing list<br class=""><a href="mailto:nginx-ru@nginx.org" class="">nginx-ru@nginx.org</a><br class=""><a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" class="">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></div></blockquote></div><br class=""></div>_______________________________________________<br class="">nginx-ru mailing list<br class=""><a href="mailto:nginx-ru@nginx.org" class="">nginx-ru@nginx.org</a><br class="">http://mailman.nginx.org/mailman/listinfo/nginx-ru</div></blockquote></div><br class=""></div></body></html>