Skip to content
Snippets Groups Projects
Commit ffab36c8 authored by ale's avatar ale
Browse files

Set nginx fd limit according to nginx_worker_connections

parent af512e7f
No related branches found
No related tags found
No related merge requests found
Pipeline #71413 failed
...@@ -22,7 +22,7 @@ nginx_limit_perserver_rate: "100r/s" ...@@ -22,7 +22,7 @@ nginx_limit_perserver_rate: "100r/s"
nginx_limit_perserver_burst: 100 nginx_limit_perserver_burst: 100
# Various top-level NGINX configuration options that might need tuning. # Various top-level NGINX configuration options that might need tuning.
nginx_worker_connections: 4096 nginx_worker_connections: 8388608
nginx_keepalive_timeout: "20s" nginx_keepalive_timeout: "20s"
nginx_server_names_hash_max_size: 2048 nginx_server_names_hash_max_size: 2048
nginx_server_names_hash_bucket_size: 2048 nginx_server_names_hash_bucket_size: 2048
...@@ -36,3 +36,4 @@ nginx_custom_error_pages: true ...@@ -36,3 +36,4 @@ nginx_custom_error_pages: true
# nginx_install_custom_error_pages: install float's custom error pages # nginx_install_custom_error_pages: install float's custom error pages
# in /var/www/html/__errors/. # in /var/www/html/__errors/.
nginx_install_custom_error_pages: true nginx_install_custom_error_pages: true
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
- proxy - proxy
- name: Install NGINX systemd unit - name: Install NGINX systemd unit
copy: template:
src: nginx.service src: nginx.service.j2
dest: /etc/systemd/system/nginx.service dest: /etc/systemd/system/nginx.service
notify: reload nginx notify: reload nginx
......
...@@ -18,7 +18,7 @@ ExecStop=/bin/kill -TERM $MAINPID ...@@ -18,7 +18,7 @@ ExecStop=/bin/kill -TERM $MAINPID
User=nginx User=nginx
Group=nginx Group=nginx
LimitNOFILE=65535 LimitNOFILE={{ nginx_worker_connections * 2 }}
NoNewPrivileges=yes NoNewPrivileges=yes
PrivateTmp=yes PrivateTmp=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment