Ⅰ. Issue Description
多次reload后,产生多个日志进程不释放
Ⅱ. Describe what happened
多次reload后,产生多个日志进程不释放
Ⅲ. Describe what you expected to happen
reoad后释放多余的日志进程
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- 目前是每隔40分钟reload一次
Ⅴ. Anything else we need to know?
日志进程的截图如下
Ⅵ. Environment:
- Tengine version (use
sbin/nginx -V
): Tengine version: Tengine/2.3.2 - OS (e.g. from /etc/os-release): CentOS Linux release 7.8.2003 (Core)
- Kernel (e.g.
uname -a
): 3.10.0-1127.el7.x86_64 fixed bugs of the limit_req module #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux - Others:
3条答案
按热度按时间vawmfj5a1#
nginx的部分 配置内容如下 ,再后面是网站的配置就不贴上来了:
`error_log "pipe:rollback /opt/logs/error.log interval=1d baknum=14 maxsize=1G";
pid /opt/logs/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '{"remote_addr":"$remote_addr","remote_user":"$remote_user","time_local":"$time_iso8601","request":"$request","status":"$status","body_bytes_sent":"$body_bytes_sent","http_referer":"$http_referer","http_user_agent":"$http_user_agent","http_x_forwarded_for":"$http_x_forwarded_for","server_name":"$server_name","upstream_addr":"$upstream_addr","upstream_response_time":"$upstream_response_time","upstream_status":"$upstream_status","http_host":"$http_host","request_time":"$request_time"}';
access_log "pipe:rollback /opt/logs/access.log interval=1d baknum=7 maxsize=10G" main;
charset utf-8;
rewrite_log on;
jgzswidk2#
建议升级最新版本 3.1.0
p4tfgftt3#
在main里显示地设置 worker_shutdown_timeout (例如 worker_shutdown_timeout 300s ;),确保上一次old processes全部优雅退出后,再执行下一次reload。