From 853d1b20bb4dfbbe187724bd76d8ea74166f8ff3 Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:21:47 +0100 Subject: [PATCH] Update NGINX worker_connections, worker_rlimit_nofile & keepalive_timeout. --- roles/reverse-proxy/templates/nginx.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/reverse-proxy/templates/nginx.conf b/roles/reverse-proxy/templates/nginx.conf index fd7bbaf..2714ab2 100644 --- a/roles/reverse-proxy/templates/nginx.conf +++ b/roles/reverse-proxy/templates/nginx.conf @@ -1,9 +1,10 @@ user www-data; worker_processes auto; +worker_rlimit_nofile 1024; include /etc/nginx/modules-enabled/*.conf; events { - worker_connections 768; + worker_connections 512; multi_accept off; } @@ -20,7 +21,7 @@ http { gzip off; types_hash_max_size 2048; server_tokens off; - keepalive_timeout 65; + keepalive_timeout 30; # server_names_hash_bucket_size 64; # server_name_in_redirect off;