]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: regularly restart workers
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 17 Aug 2023 11:45:37 +0000 (13:45 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 17 Aug 2023 11:45:37 +0000 (13:45 +0200)
cookbooks/nominatim/recipes/default.rb

index ffab40914d34be9304ca607ea2c3685aafbb2576..90c58445b12adc6a7abb11568e0607ef045bebde 100644 (file)
@@ -362,7 +362,7 @@ elsif node[:nominatim][:api_flavour] == "python"
     working_directory project_directory
     standard_output "append:#{node[:nominatim][:logdir]}/gunicorn.log"
     standard_error "inherit"
     working_directory project_directory
     standard_output "append:#{node[:nominatim][:logdir]}/gunicorn.log"
     standard_error "inherit"
-    exec_start "#{python_directory}/bin/gunicorn -b unix:/run/gunicorn-nominatim.openstreetmap.org.sock -w #{node[:nominatim][:api_workers]} -k uvicorn.workers.UvicornWorker nominatim.server.falcon.server:run_wsgi"
+    exec_start "#{python_directory}/bin/gunicorn --max-requests 200000 -b unix:/run/gunicorn-nominatim.openstreetmap.org.sock -w #{node[:nominatim][:api_workers]} -k uvicorn.workers.UvicornWorker nominatim.server.falcon.server:run_wsgi"
     exec_reload "/bin/kill -s HUP $MAINPID"
     environment :PYTHONPATH => "/usr/local/lib/nominatim/lib-python/"
     kill_mode "mixed"
     exec_reload "/bin/kill -s HUP $MAINPID"
     environment :PYTHONPATH => "/usr/local/lib/nominatim/lib-python/"
     kill_mode "mixed"