diff --git a/CHANGELOG.md b/CHANGELOG.md index 31345cf62a..2412e5e9ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Allow customizing Nginx `worker_connections` ([#1021](https://github.com/roots/trellis/pull/1021)) * Update wp-cli to 2.0.1 ([#1019](https://github.com/roots/trellis/pull/1019)) * [BREAKING] Update wp-cli to 2.0.0 and verify its PGP signature ([#1014](https://github.com/roots/trellis/pull/1014)) * Deploy: Remove obsoleted `git` remote checking ([#999](https://github.com/roots/trellis/pull/999)) diff --git a/roles/nginx/defaults/main.yml b/roles/nginx/defaults/main.yml index 85178bb1c8..ed07b1c505 100644 --- a/roles/nginx/defaults/main.yml +++ b/roles/nginx/defaults/main.yml @@ -3,6 +3,7 @@ nginx_ppa: "ppa:nginx/development" nginx_package: nginx nginx_conf: nginx.conf.j2 nginx_path: /etc/nginx +nginx_worker_connections: 8000 nginx_logs_root: /var/log/nginx nginx_user: www-data www-data nginx_fastcgi_buffers: 8 8k diff --git a/roles/nginx/templates/nginx.conf.j2 b/roles/nginx/templates/nginx.conf.j2 index 3a0548a352..f4ef92d394 100644 --- a/roles/nginx/templates/nginx.conf.j2 +++ b/roles/nginx/templates/nginx.conf.j2 @@ -32,7 +32,7 @@ events { # That's probably the point at which you hire people who are smarter than you as this is *a lot* of requests. # Should be < worker_rlimit_nofile. # Default: 512 - worker_connections 8000; + worker_connections {{ nginx_worker_connections }}; } {% endblock %}