Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust curl retry and connection timeout handling #241

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

edmorley
Copy link
Member

In the shimmed CNBs used in heroku/builder we have been seeing quite a few transient errors related to buildpacks downloading from S3.

Adding appropriate retries and connection timeouts to all of our buildpack's curl usages should help with these, as well as make builds more reliable in general for users on Heroku, plus also anyone using a shimmed CNB locally with Pack CLI (where the network connection may be even less reliable).

The --retry-connrefused option has been used since otherwise curl doesn't retry cases where the connection was refused. Ideally we would use --retry-all-errors which takes that one step further, however that option was only added in curl 7.71, so is only supported by Heroku-22+.

For more on curl options, see:
https://curl.se/docs/manpage.html

GUS-W-11283397.

In the shimmed CNBs used in `heroku/builder` we have been seeing
quite a few transient errors related to buildpacks downloading from S3.

Adding appropriate retries and connection timeouts to all of our
buildpack's curl usages should help with these, as well as make builds
more reliable in general for users on Heroku, plus also anyone using a
shimmed CNB locally with Pack CLI (where the network connection may
be even less reliable).

The `--retry-connrefused` option has been used since otherwise curl
doesn't retry cases where the connection was refused. Ideally we would
use `--retry-all-errors` which takes that one step further, however that
option was only added in curl 7.71, so is only supported by Heroku-22+.

For more on curl options, see:
https://curl.se/docs/manpage.html

GUS-W-11283397.
@edmorley edmorley self-assigned this Jun 13, 2022
bin/java Show resolved Hide resolved
@edmorley edmorley marked this pull request as ready for review June 13, 2022 20:57
@edmorley edmorley requested a review from a team as a code owner June 13, 2022 20:57
@edmorley edmorley merged commit e057e12 into main Jun 14, 2022
@edmorley edmorley deleted the edmorley/reliable-curl branch June 14, 2022 08:12
edmorley added a commit that referenced this pull request Jun 14, 2022
To pick up #240 & #241.
@edmorley edmorley mentioned this pull request Jun 14, 2022
edmorley added a commit that referenced this pull request Jun 14, 2022
EtienneM pushed a commit to Scalingo/buildpack-jvm-common that referenced this pull request Jul 21, 2022
In the shimmed CNBs used in `heroku/builder` we have been seeing
quite a few transient errors related to buildpacks downloading from S3.

Adding appropriate retries and connection timeouts to all of our
buildpack's curl usages should help with these, as well as make builds
more reliable in general for users on Heroku, plus also anyone using a
shimmed CNB locally with Pack CLI (where the network connection may
be even less reliable).

The `--retry-connrefused` option has been used since otherwise curl
doesn't retry cases where the connection was refused. Ideally we would
use `--retry-all-errors` which takes that one step further, however that
option was only added in curl 7.71, so is only supported by Heroku-22+.

For more on curl options, see:
https://curl.se/docs/manpage.html

GUS-W-11283397.
EtienneM pushed a commit to Scalingo/buildpack-jvm-common that referenced this pull request Jul 21, 2022
To pick up heroku#240 & heroku#241.

GUS-W-11283397.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants