[ARVADOS] created: a0f073ccf5f4bf291d8909e60cb94202322aa0d9
Git user
git at public.curoverse.com
Thu Sep 8 14:06:57 EDT 2016
at a0f073ccf5f4bf291d8909e60cb94202322aa0d9 (commit)
commit a0f073ccf5f4bf291d8909e60cb94202322aa0d9
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Sep 8 10:41:37 2016 -0400
9990: Add configs for Workbench API client timeouts.
diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb
index 13d4a24..3aca54f 100644
--- a/apps/workbench/app/models/arvados_api_client.rb
+++ b/apps/workbench/app/models/arvados_api_client.rb
@@ -85,6 +85,9 @@ class ArvadosApiClient
if not @api_client
@client_mtx.synchronize do
@api_client = HTTPClient.new
+ @api_client.ssl_config.timeout = Rails.configuration.api_client_connect_timeout
+ @api_client.connect_timeout = Rails.configuration.api_client_connect_timeout
+ @api_client.receive_timeout = Rails.configuration.api_client_receive_timeout
if Rails.configuration.arvados_insecure_https
@api_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
else
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 5400deb..74d317b 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -219,6 +219,10 @@ common:
# Ask Arvados API server to compress its response payloads.
api_response_compression: true
+ # Timeouts for API requests.
+ api_client_connect_timeout: 120
+ api_client_receive_timeout: 300
+
# ShellInABox service endpoint URL for a given VM. If false, do not
# offer web shell logins.
#
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list