From 4e3d38f80c67c7746bdc8113c966e5ac12f1ffa0 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 2 Apr 2024 14:31:52 +0100 Subject: [PATCH 1/1] imager: tune timeout and lower titiler workers --- cookbooks/imagery/recipes/tiler.rb | 2 +- cookbooks/imagery/templates/default/nginx_titiler.conf.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbooks/imagery/recipes/tiler.rb b/cookbooks/imagery/recipes/tiler.rb index 69e3abdf7..f1f06015a 100644 --- a/cookbooks/imagery/recipes/tiler.rb +++ b/cookbooks/imagery/recipes/tiler.rb @@ -32,7 +32,7 @@ podman_service "titiler" do image container_image ports 8080 => 8080 environment :PORT => 8080, - :WORKERS_PER_CORE => 2, + :WORKERS_PER_CORE => 1, :GDAL_CACHEMAX => 200, :GDAL_DISABLE_READDIR_ON_OPEN => "EMPTY_DIR", :GDAL_INGESTED_BYTES_AT_OPEN => 32768, diff --git a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb index f78d2858c..a1dbb9377 100644 --- a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb @@ -21,6 +21,7 @@ server { server_name <%= @name %> <% @aliases.each do |alias_name| %> <%= alias_name %><%- end -%>; http2_max_concurrent_streams 512; + keepalive_timeout 10s; ssl_certificate /etc/ssl/certs/<%= @name %>.pem; ssl_certificate_key /etc/ssl/private/<%= @name %>.key; -- 2.39.5