Skip to content

Add curl timeout and retry flags to prevent install script hangs#517

Open
enescakir wants to merge 1 commit intoDopplerHQ:masterfrom
enescakir:fix/curl-timeout
Open

Add curl timeout and retry flags to prevent install script hangs#517
enescakir wants to merge 1 commit intoDopplerHQ:masterfrom
enescakir:fix/curl-timeout

Conversation

@enescakir
Copy link

The curl command in curl_download() had no connect-timeout or max-time set, causing it to hang indefinitely on slow/stalled connections. The --retry 5 flag was ineffective because curl never timed out on its own to trigger a retry.

The dopplerhq/cli-action action has 30 seconds timeout, so it occasionally fails without retry.

Added:

  • --connect-timeout 10: fail fast if server is unreachable
  • --max-time 60: cap total transfer time per attempt
  • --retry-all-errors: retry on all errors, not just transient ones

@enescakir enescakir requested a review from a team as a code owner March 2, 2026 13:33
@wotschofsky
Copy link

+1 This would be very helpful for us. We regularly run into ETIMEDOUT errors, making CI fail.

@amoses12
Copy link
Contributor

amoses12 commented Mar 5, 2026

Hey @enescakir, I've reviewed and tested this and this all looks good. Could you please remove claude as a co-author for the commit? Once that's done, I'll approve this and get it merged. Thanks!

@enescakir
Copy link
Author

Hey @enescakir, I've reviewed and tested this and this all looks good. Could you please remove claude as a co-author for the commit? Once that's done, I'll approve this and get it merged. Thanks!

Thanks @amoses12, I'll remove it.

I have one more question. My main motivation for changing it was to improve the robustness of the dopplerhq/cli-action.

Since the action has a 30 seconds timeout, using --max-time 60 might be too high because it prevents retries if the download stalls. The action itself times out at 30 seconds before reaching the 60 seconds max time.

However, using a much shorter --max-time than 60 seconds also feels a bit too aggressive. Another option could be increasing the action’s timeout or making it configurable. What do you think?

The curl command in curl_download() had no connect-timeout or max-time
set, causing it to hang indefinitely on slow/stalled connections. The
--retry 5 flag was ineffective because curl never timed out on its own
to trigger a retry.

Added:
- --connect-timeout 10: fail fast if server is unreachable
- --max-time 60: cap total transfer time per attempt
- --retry-all-errors: retry on all errors, not just transient ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants