]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: add api timeout settings
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 25 Aug 2023 07:59:52 +0000 (09:59 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 25 Aug 2023 07:59:52 +0000 (09:59 +0200)
cookbooks/nominatim/attributes/default.rb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/nominatim.env.erb

index 1edb544d280dc63ccbdfaae5e9bb0f8195f96469..1f5a1560bed05dbf37a6569f9328239f8908b8d4 100644 (file)
@@ -17,6 +17,8 @@ default[:nominatim][:qa_revision] = "main"
 default[:nominatim][:api_flavour] = "php"
 default[:nominatim][:api_workers] = 10
 default[:nominatim][:api_pool_size] = 10
+default[:nominatim][:api_query_timeout] = 5
+default[:nominatim][:api_request_timeout] = 20
 
 default[:nominatim][:fpm_pools] = {
   "nominatim.openstreetmap.org" => {
index 9736f301a7b5aa4994c545967d16d9333969b4c5..a2739f403be7135fd5156ed4cfa8071600fde310 100644 (file)
@@ -310,7 +310,9 @@ template "#{project_directory}/.env" do
             :log_file => "#{node[:nominatim][:logdir]}/query.log",
             :tokenizer => node[:nominatim][:config][:tokenizer],
             :forward_dependencies => node[:nominatim][:config][:forward_dependencies],
-            :pool_size => node[:nominatim][:api_pool_size]
+            :pool_size => node[:nominatim][:api_pool_size],
+            :query_timeout => node[:nominatim][:api_query_timeout],
+            :request_timeout => node[:nominatim][:api_request_timeout]
 end
 
 remote_file "#{project_directory}/wikimedia-importance.sql.gz" do
index 472aa4949a66c2d35d9686498c7c75ba18980546..9f38b02ffbf32a0d3a5e73c294382a45a330d16e 100644 (file)
@@ -9,6 +9,8 @@ NOMINATIM_FLATNODE_FILE="<%= @flatnode_file %>"
 
 NOMINATIM_SERVE_LEGACY_URLS=yes
 NOMINATIM_API_POOL_SIZE=<%= @pool_size %>
+NOMINATIM_QUERY_TIMEOUT=<%= @query_timeout %>
+NOMINATIM_REQUEST_TIMEOUT=<%= @request_timeout %>
 
 NOMINATIM_IMPORT_STYLE=extratags