From 664d433d3a24adf9a1e605c4ba1dc7b60f26b9e2 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Wed, 11 Mar 2020 16:45:39 +0100 Subject: [PATCH] Enhancement: Increased read timeout for SearchIndexBackend and changed total timeout passed to UserAgent to not overwrite (lower) open- or read timeouts for handling larger payloads. --- lib/search_index_backend.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/search_index_backend.rb b/lib/search_index_backend.rb index 7b9ae3422..bad4da09f 100644 --- a/lib/search_index_backend.rb +++ b/lib/search_index_backend.rb @@ -849,7 +849,7 @@ helper method for making HTTP calls @return UserAgent response =end - def self.make_request(url, data: {}, method: :get, open_timeout: 8, read_timeout: 60) + def self.make_request(url, data: {}, method: :get, open_timeout: 8, read_timeout: 180) Rails.logger.info "# curl -X #{method} \"#{url}\" " Rails.logger.debug { "-d '#{data.to_json}'" } if data.present? @@ -857,6 +857,7 @@ helper method for making HTTP calls json: true, open_timeout: open_timeout, read_timeout: read_timeout, + total_timeout: (open_timeout + read_timeout + 60), open_socket_tries: 3, user: Setting.get('es_user'), password: Setting.get('es_password'),