Repository navigation
fix: restore the 120s default HTTP timeout - #108
Merged
Merged
Conversation
e3ff072 (2026-03-04) lowered the default from 120s to 1s. One second is the timeout for an ENTIRE request - connect, send and receive - not just the connection, and several vServer APIs do not answer that fast. Create and update volume are the clearest case: 3646ec6 raised the value from 30s to 120s precisely because those calls were timing out. Consumers that want something tighter can call WithTimeout(). Lowering the default affects every repository using the SDK, and the ones on v2.19+ have been running with a one-second budget without anything in their own code to show for it: cluster-api-control-plane-vngcloud v2.20.0 1s vks-controlplane-logs-worker v2.19.3-0.20260525094658 1s vngcloud-cluster-deputy-controller v2.19.2 1s Note for whoever picks this up next: SetTimeout here is paired with SetCommonRetryCount(3) and SetCommonRetryFixedInterval(10) - ten NANOseconds, not ten seconds, since 10 is an untyped constant converted to time.Duration. With the timeout back at 120s, a single DoRequest against an unresponsive endpoint can therefore occupy a caller for up to 4 x 120s = 8 minutes. That retry configuration is a separate problem and is left alone here rather than bundled into a one-line timeout fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e3ff072 (2026-03-04) lowered the default from 120s to 1s. One second is the timeout for an ENTIRE request - connect, send and receive - not just the connection, and several vServer APIs do not answer that fast. Create and update volume are the clearest case: 3646ec6 raised the value from 30s to 120s precisely because those calls were timing out.
Consumers that want something tighter can call WithTimeout(). Lowering the default affects every repository using the SDK, and the ones on v2.19+ have been running with a one-second budget without anything in their own code to show for it:
Note for whoever picks this up next: SetTimeout here is paired with SetCommonRetryCount(3) and SetCommonRetryFixedInterval(10) - ten NANOseconds, not ten seconds, since 10 is an untyped constant converted to time.Duration. With the timeout back at 120s, a single DoRequest against an unresponsive endpoint can therefore occupy a caller for up to 4 x 120s = 8 minutes. That retry configuration is a separate problem and is left alone here rather than bundled into a one-line timeout fix.