Skip to content

[Bug]: Adyen HTTP Client Timeout Issue #1794

@senturkozer

Description

@senturkozer

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:

Adyen HTTP client's latency increased dramatically to up to 4 minutes like below:

Image

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions