From 883c754c10bcc8b94844658c61512dfbb8a2e8a3 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Thu, 17 Oct 2019 12:47:09 +0100 Subject: [PATCH] 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 --- cookbooks/tilecache/templates/default/nginx_tile.conf.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.43.2