netstat -anp показывает тысячи LISTEN ХХХХ/nginx: master
Denis Kot
denis.kot на gmail.com
Пн Мар 7 16:07:18 MSK 2011
Собственно сабж
netstat -anp | grep nginx выдает тысячи (подозреваю, что сотни тысяч,
т.к. "netstat -anp | grep nginx | grep LISTEN | wc -l" уже минут 10
считает) строчек вида:
....
tcp 2 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 2 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 8622/nginx: master
...
# nginx -V
nginx: nginx version: nginx/0.9.5
nginx: TLS SNI support enabled
nginx: configure arguments: --with-md5=/usr/include --with-sha1-asm
--with-sha1=/usr/include --with-http_addition_module
--with-http_realip_module --with-http_ssl_module
--with-http_perl_module --with-http_stub_status_module
--without-mail_pop3_module --without-mail_smtp_module
--without-mail_imap_module
С 0.8.53 такая же ситуация.
Это нормально?
Главный конфиг:
user nginx nginx;
worker_processes 1;
worker_rlimit_nofile 32768;
error_log /var/log/nginx/error_log info;
events {
worker_connections 8196;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
set_real_ip_from 1.1.1.1;
real_ip_header X-Real-IP;
proxy_cache_path /var/www/nginx/proxy
levels=1:2 keys_zone=zonename:64m max_size=512m
inactive=30d;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
server_names_hash_bucket_size 64;
connection_pool_size 1024;
client_header_buffer_size 64k;
large_client_header_buffers 32 64k;
request_pool_size 16k;
gzip on;
gzip_min_length 110;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
output_buffers 4 32k;
client_max_body_size 10M;
postpone_output 1460;
sendfile off;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30 20;
# ignore_invalid_headers on;
# index index.html;
upstream phpfarm {
server unix:/dev/shm/www.sock weight=100 max_fails=10
fail_timeout=5;
# server unix:/dev/shm/www1.sock weight=100 max_fails=10
fail_timeout=5;
# server unix:/dev/shm/www2.sock weight=50 max_fails=10
fail_timeout=5;
# server 127.0.0.1:9000 weight=100 max_fails=10 fail_timeout=5;
}
upstream torrfarm {
# server 10.11.12.8:9000;
server unix:/dev/shm/www1.sock;
}
# server {
# listen 127.0.0.1;
# server_name localhost;
#
# access_log /var/log/nginx/localhost.access_log main;
# error_log /var/log/nginx/localhost.error_log info;
#
# root /var/www/localhost/htdocs;
# }
# SSL example
#server {
# listen 127.0.0.1:443;
# server_name localhost;
# ssl on;
# ssl_certificate /etc/ssl/nginx/nginx.pem;
# ssl_certificate_key /etc/ssl/nginx/nginx.key;
# access_log /var/log/nginx/localhost.ssl_access_log main;
# error_log /var/log/nginx/localhost.ssl_error_log info;
# root /var/www/localhost/htdocs;
#}
include /etc/nginx/vhosts/*.conf;
}
Denis Kot
Подробная информация о списке рассылки nginx-ru