Re: Кол-во подключений в состоянии writing --- магическое число, почему?

Yury V. Zaytsev nginx-forum на nginx.us
Пт Май 28 11:53:11 MSD 2010


Алферов Василий Wrote:
-------------------------------------------------------
> 75 = 25 (worker processes) * 3 ?

Я тоже так предположил сначала, но непонятно откуда взялся фактор 3 :-) Действительно, надо проверить. Сейчас изменил workers на 10; и сделал killproc $nginx -HUP. Однако успеха не имел. Кол-во процессов осталось неизменным. Решил увеличить до 35 --- кол-во процессов не увеличивается. В логе появилось следующее:

[code]
2010/05/28 11:44:50 [emerg] 14279#0: bind() to 127.0.0.1:8080 failed (98: Address already in use)
2010/05/28 11:44:50 [notice] 14279#0: try again to bind() after 500ms
2010/05/28 11:44:50 [emerg] 14279#0: bind() to 127.0.0.1:8080 failed (98: Address already in use)
2010/05/28 11:44:50 [notice] 14279#0: try again to bind() after 500ms
2010/05/28 11:44:50 [emerg] 14279#0: bind() to 127.0.0.1:8080 failed (98: Address already in use)
2010/05/28 11:44:50 [notice] 14279#0: try again to bind() after 500ms
2010/05/28 11:44:50 [emerg] 14279#0: bind() to 127.0.0.1:8080 failed (98: Address already in use)
2010/05/28 11:44:50 [notice] 14279#0: try again to bind() after 500ms
2010/05/28 11:44:50 [emerg] 14279#0: bind() to 127.0.0.1:8080 failed (98: Address already in use)
2010/05/28 11:44:50 [notice] 14279#0: try again to bind() after 500ms
2010/05/28 11:44:50 [emerg] 14279#0: still could not bind()
[/code]

В конфиге есть два server, один обслуживает основной сайт, другой --- stub_status и некие внутренние утилиты:

server {                                                              
    listen          80 default;
    server_name     _;
}

server {
    listen      127.0.0.1:8080;
    server_name localhost;
}

$ netstat -a |grep 8080 ---> ничего.

$ curl http://localhost:8080/nginx_status
Active connections: 81 
server accepts handled requests
 496607 496607 2829871 
Reading: 0 Writing: 74 Waiting: 7 

Что за бесовщина такая кто-нибудь вообще понимает?

--Z.

[code]
$ nginx -V
nginx version: nginx/0.7.65
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
TLS SNI support disabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --add-module=/builddir/build/BUILD/nginx-0.7.65/nginx-upstream-fair
[/code]

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,90919,91387#msg-91387




Подробная информация о списке рассылки nginx-ru