-
Notifications
You must be signed in to change notification settings - Fork 150
Description
Description
We configured Adyen HTTP client timeout values like this: connectionTimeoutMillis=15secs, readTimeoutMillis=15secs, connectionRequestTimeoutMillis=15secs. However, there was an incident on Adyen India servers between Feb 27, 3:00 pm and Feb 27, 3:50 pm, and we saw that Adyen gateway latencies increased to up to 4 minutes. According to our configuration, this should have never happened. Because requests would have terminated much earlier with an error, according to our Adyen client timeout configuration. We need this behavior to be fixed.
Steps to reproduce
This is not an easily reproducible issue...
Our current Adyen config is like below:
config.connectionTimeoutMillis = 15000
config.readTimeoutMillis = 15000
config.connectionRequestTimeoutMillis = 15000
Between Feb 27, 3:00 pm and Feb 27, 3:50 pm, there was an incident on Adyen India account. We got lots of below errors:
- Remote host terminated the handshake
- b8b15f59a7180e80-UdemyIncIndia-checkout-live.adyenpayments.com:443 failed to respond
- Read timed out
- Connect to https://b8b15f59a7180e80-UdemyIncIndia-checkout-live.adyenpayments.com:443 failed: Read timed out
- Connection reset
Adyen HTTP client's latency increased dramatically to up to 4 minutes like below:
Actual behavior
Adyen HTTP client actual time out values increased to up to 4 minutes.
Expected behavior
Adyen HTTP client should have timed out much earlier than the current situation.
Code snippet or screenshots (if applicable)
We are not sure what exactly the problem is, however, we suspect from the below code piece:
private CloseableHttpClient createHttpClientWithSocketFactory(
SSLConnectionSocketFactory socketFactory) {
return HttpClients.custom()
.setConnectionManager(
PoolingHttpClientConnectionManagerBuilder.create()
.setSSLSocketFactory(socketFactory)
.build())
.setRedirectStrategy(new AdyenCustomRedirectStrategy())
.build();
}Above, a custom HTTP client gets created with the default configuration.
Maybe, setting a default configuration via setDefaultRequestConfig function and using the configuration parameters that we provided might help solve/mitigate the issue that we face.
We see and understand that, timeout configurations are set per request at a later phase, however, we also suspect that this default configuration might still be actively used under heavy load.
Adyen Java API Library version
41.0.0
Java version
21
Operating System
Linux
Additional context
No response