8
tengine-2.3.2 做 TCP 负载均衡,执行 reload 后,worker process 不释放(过了一个晚上都没释放)。 配置信息: ----------nginx.conf--------------- user nobody; worker_processes 4; worker_rlimit_nofile 65535; error_log /opt/logs/nginx/error.log info; pid /opt/run/nginx/nginx.pid; events { worker_connections 65535; } stream {
log_format main '[$time_local] $remote_addr '
'$protocol $status '
'$session_time $upstream_addr '
'$upstream_connect_time';
access_log /opt/logs/nginx/access.log main gzip flush=5m;
upstream elasticsearch {
server 192.168.1.82:9300 max_fails=1 fail_timeout=120s weight=1;
server 192.168.1.93:9300 max_fails=1 fail_timeout=120s weight=1;
server 192.168.1.94:9300 max_fails=1 fail_timeout=120s weight=1;
server 192.168.1.173:9300 max_fails=1 fail_timeout=120s weight=1;
server 192.168.1.174:9300 max_fails=1 fail_timeout=120s weight=1;
}
server {
listen 9300;
error_log /opt/logs/nginx/es_error.log debug;
access_log /opt/logs/nginx/es.log main gzip flush=10m;
proxy_timeout 120s;
proxy_connect_timeout 120s;
proxy_buffer_size 128k;
proxy_next_upstream on;
proxy_next_upstream_timeout 10s;
proxy_pass elasticsearch;
}
}