diff --git a/app/services/address_client.rb b/app/services/address_client.rb index 670fbe643..831dfde54 100644 --- a/app/services/address_client.rb +++ b/app/services/address_client.rb @@ -30,7 +30,7 @@ private client.use_ssl = true client.verify_mode = OpenSSL::SSL::VERIFY_PEER client.max_retries = 3 - client.read_timeout = 10 # seconds + client.read_timeout = 30 # seconds client end diff --git a/app/services/postcode_service.rb b/app/services/postcode_service.rb index 74c1f4895..c3c6dcfdd 100644 --- a/app/services/postcode_service.rb +++ b/app/services/postcode_service.rb @@ -11,7 +11,7 @@ class PostcodeService begin # URI encoding only supports ASCII characters ascii_postcode = self.class.clean(postcode) - Timeout.timeout(5) { postcode_lookup = @pio.lookup(ascii_postcode) } + Timeout.timeout(30) { postcode_lookup = @pio.lookup(ascii_postcode) } rescue Timeout::Error Rails.logger.warn("Postcodes.io lookup timed out") end diff --git a/app/services/uprn_client.rb b/app/services/uprn_client.rb index 2e57a6072..7c9bf8940 100644 --- a/app/services/uprn_client.rb +++ b/app/services/uprn_client.rb @@ -30,7 +30,7 @@ private client.use_ssl = true client.verify_mode = OpenSSL::SSL::VERIFY_PEER client.max_retries = 3 - client.read_timeout = 10 # seconds + client.read_timeout = 30 # seconds client end