From c14cfa4625368c010d414eda1130ecbd43b97504 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 7 May 2024 14:31:42 +0100 Subject: [PATCH] imagery: restart titiler service to workaround resource leak --- cookbooks/imagery/recipes/tiler.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cookbooks/imagery/recipes/tiler.rb b/cookbooks/imagery/recipes/tiler.rb index f5eff5c66..028e8e34e 100644 --- a/cookbooks/imagery/recipes/tiler.rb +++ b/cookbooks/imagery/recipes/tiler.rb @@ -53,6 +53,19 @@ podman_service "titiler" do :FORWARDED_ALLOW_IPS => "*" # https://docs.gunicorn.org/en/latest/settings.html#forwarded-allow-ips end +systemd_service "titiler-restart" do + type "simple" + user "root" + exec_start "/bin/systemctl try-restart titiler.service" + sandbox true + restrict_address_families "AF_UNIX" +end + +systemd_timer "titiler-restart" do + on_boot_sec "6h" + on_unit_inactive_sec "12h" +end + directory "/var/cache/nginx-cache" do owner "www-data" group "www-data" -- 2.45.1