From 621ce65fee50f211d7d13a7e9f93d1ba7ddab4f6 Mon Sep 17 00:00:00 2001 From: Miss-you Date: Wed, 22 Jul 2020 01:38:16 +0800 Subject: [PATCH] 'worker_shutdown_timeout 240s' in nginx.conf is better. --- .travis/apisix_cli_test.sh | 12 ++++++++++++ conf/config.yaml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis/apisix_cli_test.sh b/.travis/apisix_cli_test.sh index ca31995c73f2..e30cd5b97c24 100755 --- a/.travis/apisix_cli_test.sh +++ b/.travis/apisix_cli_test.sh @@ -149,3 +149,15 @@ fi set -ex echo "passed: rollback to the default admin config" + +# check the 'worker_shutdown_timeout' in 'nginx.conf' . + +make init + +grep -E "worker_shutdown_timeout 240s" conf/nginx.conf > /dev/null +if [ ! $? -eq 0 ]; then + echo "failed: worker_shutdown_timeout in nginx.conf is required 240s" + exit 1 +fi + +echo "passed: worker_shutdown_timeout in nginx.conf is ok" diff --git a/conf/config.yaml b/conf/config.yaml index 4b44c6c72393..58e113997ea4 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -104,7 +104,7 @@ nginx_config: # config for render the template to genarate n error_log: "logs/error.log" error_log_level: "warn" # warn,error worker_rlimit_nofile: 20480 # the number of files a worker process can open, should be larger than worker_connections - worker_shutdown_timeout: 3s # timeout for a graceful shutdown of worker processes + worker_shutdown_timeout: 240s # timeout for a graceful shutdown of worker processes event: worker_connections: 10620 http: