Welcome! Log In Create A New Profile

Advanced

"worker_connections are not enough" - обсудим ?

Илья Шипицин
July 05, 2018 10:30AM
привет!

налетели на ситуацию. сценарий, как воспроизвести на стенде

1. centos 7, nginx-1.15.1 из официального репозитория
2. конфиг

# cat /etc/nginx/nginx.conf

user root;
worker_processes auto;

events {
worker_connections 512;
}

stream {
include /etc/nginx/conf.d/*.conf;
}

т.е. видим (дефолтное ограничение в "worker_connections 512;")
далее при помощи вот такого генератора

# cat generator.sh
#!/bin/bash

i=2000
while [ $i -le 2700 ]
do
((i++))

cat <<EOF >> /etc/nginx/conf.d/stream.conf
server {
listen 127.0.0.1:${i};
proxy_pass 127.0.0.2:${i};
}
EOF

done

генерируем 700 стримов.

проверяем, nginx говорит, что ему конфиг ок

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
#

перезапускаем, все тоже ок

# systemctl restart nginx
#


но в процессах только мастер, воркера нет.
смотрим лог:

# cat /var/log/nginx/error.log | tail -2
2018/07/05 14:27:53 [alert] 1546#1546: 512 worker_connections are not enough
2018/07/05 14:27:53 [alert] 1545#1545: worker process 1546 exited with
fatal code 2 and cannot be respawned
#


кажется, что было бы логично отсекать такие ошибки во время "nginx -t"
что думаете ?


Илья Шипицин
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

"worker_connections are not enough" - обсудим ?

Илья Шипицин July 05, 2018 10:30AM

Re: "worker_connections are not enough" - обсудим ?

Maxim Dounin July 05, 2018 09:32PM

Re: "worker_connections are not enough" - обсудим ?

Илья Шипицин July 06, 2018 12:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
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