From: Matt Amos Date: Thu, 17 Oct 2019 11:47:09 +0000 (+0100) Subject: Increase nginx keepalive settings. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/883c754c10bcc8b94844658c61512dfbb8a2e8a3 Increase nginx keepalive settings. Increase both the number of requests per keepalive connection and the number of keepalive connections to retain. This should reduce the number of sockets used for a single connection and therefore make it less likely that nginx will experience ephemeral socket exhaustion at high request rates. Closes #255 --- diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 611bd4a73..c3b220f2d 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -15,7 +15,8 @@ upstream tile_cache_backend { <% end -%> <% end -%> - keepalive 256; + keepalive 1024; + keepalive_requests 1024; } # Geo Map of tile caches