CyberSource / CyberSource/cybersource-rest-client-java

Rationale for setting default connectionTimeout to 1 second in ApiClient?

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
29
Forks
50
Avg merge
28m
Merged PRs (30d)
1

Description

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!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating ApiClient and the handling of merchantConfig.getUserDefinedConnectionTimeout(), then inspect how the one-second default is defined and tested. The issue is resolved when the rationale for that default and the trade-offs of increasing it are documented, or the requested default change is explicitly scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.