Просмотр исходного кода

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.

Rolf Schmidt 5 лет назад
Родитель
Сommit
664d433d3a
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      lib/search_index_backend.rb

+ 2 - 1
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'),