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.

This commit is contained in:
Rolf Schmidt 2020-03-11 16:45:39 +01:00 committed by Thorsten Eckel
parent dd96c57f48
commit 664d433d3a

View file

@ -849,7 +849,7 @@ helper method for making HTTP calls
@return UserAgent response @return UserAgent response
=end =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.info "# curl -X #{method} \"#{url}\" "
Rails.logger.debug { "-d '#{data.to_json}'" } if data.present? Rails.logger.debug { "-d '#{data.to_json}'" } if data.present?
@ -857,6 +857,7 @@ helper method for making HTTP calls
json: true, json: true,
open_timeout: open_timeout, open_timeout: open_timeout,
read_timeout: read_timeout, read_timeout: read_timeout,
total_timeout: (open_timeout + read_timeout + 60),
open_socket_tries: 3, open_socket_tries: 3,
user: Setting.get('es_user'), user: Setting.get('es_user'),
password: Setting.get('es_password'), password: Setting.get('es_password'),