Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多次reload后,产生多个日志进程不释放 #1925

Open
shenxf1205 opened this issue Apr 2, 2024 · 3 comments
Open

多次reload后,产生多个日志进程不释放 #1925

shenxf1205 opened this issue Apr 2, 2024 · 3 comments

Comments

@shenxf1205
Copy link

Ⅰ. Issue Description

多次reload后,产生多个日志进程不释放

Ⅱ. Describe what happened

多次reload后,产生多个日志进程不释放

Ⅲ. Describe what you expected to happen

reoad后释放多余的日志进程

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. 目前是每隔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:
@shenxf1205
Copy link
Author

shenxf1205 commented Apr 2, 2024

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;

root /home/www/;

check_shm_size  40m;
client_max_body_size 800m;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
sendfile        on;
tcp_nopush     on;
keepalive_timeout 60;
tcp_nodelay on;

server_tag off;
server_info off;

gzip  on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_types text/plain application/javascript text/css application/json application/x-javascript application/xml image/jpeg image
gzip_disable "MSIE [1-6]\.";
gzip_vary off;`

@lianglli
Copy link
Member

lianglli commented Apr 3, 2024

建议升级最新版本 3.1.0

@lianglli
Copy link
Member

lianglli commented Apr 3, 2024

在main里显示地设置 worker_shutdown_timeout (例如 worker_shutdown_timeout 300s ;),确保上一次old processes全部优雅退出后,再执行下一次reload。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants