Browse Source

CLDC-4066: Reduce read timeout for OS Places APIs 30 -> 15

in practice waiting up to 1 min 30 for requests could cause too many threads to be blocked under periods of slow OS Places API

this reduces the max wait time to 45 seconds, as requested by CORE
CLDC-4066-improve-resilience-to-os-places-api-outage
Samuel Young 3 days ago
parent
commit
25b4120838
  1. 2
      app/services/address_client.rb
  2. 2
      app/services/uprn_client.rb

2
app/services/address_client.rb

@ -35,7 +35,7 @@ private
client.use_ssl = true client.use_ssl = true
client.verify_mode = OpenSSL::SSL::VERIFY_PEER client.verify_mode = OpenSSL::SSL::VERIFY_PEER
client.max_retries = 3 client.max_retries = 3
client.read_timeout = 30 # seconds client.read_timeout = 15 # seconds
client client
end end

2
app/services/uprn_client.rb

@ -39,7 +39,7 @@ private
client.use_ssl = true client.use_ssl = true
client.verify_mode = OpenSSL::SSL::VERIFY_PEER client.verify_mode = OpenSSL::SSL::VERIFY_PEER
client.max_retries = 3 client.max_retries = 3
client.read_timeout = 30 # seconds client.read_timeout = 20 # seconds
client client
end end

Loading…
Cancel
Save