Merge pull request #3144 from dokku/3142-increase-curl-timeouts

Increase curl max timeout to 600 seconds (10 minutes)
This commit is contained in:
Jose Diaz-Gonzalez
2018-04-07 02:58:37 -04:00
committed by GitHub
4 changed files with 5 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ Certain buildpacks may time out in retrieving dependencies via curl. This can ha
If you see output similar this when deploying , you may need to override the curl timeouts to increase the length of time allotted to those tasks. You can do so via the `config` plugin:
```shell
dokku config:set --global CURL_TIMEOUT=600
dokku config:set --global CURL_TIMEOUT=1200
dokku config:set --global CURL_CONNECT_TIMEOUT=180
```

View File

@@ -146,10 +146,10 @@ If you see output similar this when deploying:
! tar: Error is not recoverable: exiting now
```
it might that the curl command that is supposed to fetch the buildpack (anything in the low megabyte file size range) takes too long to finish, due to slowish connection. To overwrite the default values (connection timeout: 3 seconds, total maximum time for operation: 30 seconds), set the following environment variables:
it might that the curl command that is supposed to fetch the buildpack (anything in the low megabyte file size range) takes too long to finish, due to slowish connection. To overwrite the default values (connection timeout: 90 seconds, total maximum time for operation: 600 seconds), set the following environment variables:
```shell
dokku config:set --global CURL_TIMEOUT=600
dokku config:set --global CURL_TIMEOUT=1200
dokku config:set --global CURL_CONNECT_TIMEOUT=180
```

View File

@@ -13,7 +13,7 @@ build_env_pre_build_buildpack() {
IMAGE=$(get_app_image_name "$APP");
[[ -z $(config_get --global CURL_CONNECT_TIMEOUT) ]] && config_set --global CURL_CONNECT_TIMEOUT=90
[[ -z $(config_get --global CURL_TIMEOUT) ]] && config_set --global CURL_TIMEOUT=60
[[ -z $(config_get --global CURL_TIMEOUT) ]] && config_set --global CURL_TIMEOUT=600
dokku_log_info1 "Adding BUILD_ENV to build environment..."
# create build env files for use in buildpacks like this:

View File

@@ -40,7 +40,7 @@ teardown() {
echo "status: "$status
assert_success
run /bin/bash -c "dokku config:get --global CURL_TIMEOUT | grep 60"
run /bin/bash -c "dokku config:get --global CURL_TIMEOUT | grep 600"
echo "output: "$output
echo "status: "$status
assert_success