Skip to content

Rationale for setting default connectionTimeout to 1 second in ApiClient? #200

Description

@YN-CTC

Hi team,

In our project, we are frequently encountering connect timed out errors, which seem to be caused by the connection timeout setting. Currently, we are not explicitly setting merchantConfig.getUserDefinedConnectionTimeout(), so the default value of 1 second is being used.

Personally, I feel that 1 second is quite short, especially considering that network conditions can vary, and sometimes a proxy is involved. We are considering increasing this timeout to around 10 seconds to see if it helps resolve the issue.

I wanted to ask:

  • Is there a specific reason why the default connection timeout is set to just 1 second?
  • Are there any concerns or trade-offs we should be aware of if we increase it to 10 seconds?

Thanks in advance for your insights!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions