]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: restart titiler service to workaround resource leak
authorGrant Slater <github@firefishy.com>
Tue, 7 May 2024 13:31:42 +0000 (14:31 +0100)
committerGrant Slater <github@firefishy.com>
Tue, 7 May 2024 13:31:42 +0000 (14:31 +0100)
cookbooks/imagery/recipes/tiler.rb

index f5eff5c66643f305cfc07561a99e6dd3f48a49da..028e8e34ec334a2178f0bef76e5cd4fdf8a3d129 100644 (file)
@@ -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"