From c90486547f33cea2005ebd8c93650c0d8705b125 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 7 Apr 2018 01:09:19 -0400 Subject: [PATCH] feat: increase curl max timeout to 600 seconds (10 minutes) Closes #3142 --- docs/deployment/methods/buildpacks.md | 2 +- docs/getting-started/troubleshooting.md | 4 ++-- plugins/build-env/pre-build-buildpack | 2 +- tests/unit/20_build-env.bats | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/deployment/methods/buildpacks.md b/docs/deployment/methods/buildpacks.md index 12a01027c..068fbd2f1 100644 --- a/docs/deployment/methods/buildpacks.md +++ b/docs/deployment/methods/buildpacks.md @@ -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 ``` diff --git a/docs/getting-started/troubleshooting.md b/docs/getting-started/troubleshooting.md index 7ad185c3e..04c01fb16 100644 --- a/docs/getting-started/troubleshooting.md +++ b/docs/getting-started/troubleshooting.md @@ -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 ``` diff --git a/plugins/build-env/pre-build-buildpack b/plugins/build-env/pre-build-buildpack index c874eca53..19cd835e1 100755 --- a/plugins/build-env/pre-build-buildpack +++ b/plugins/build-env/pre-build-buildpack @@ -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: diff --git a/tests/unit/20_build-env.bats b/tests/unit/20_build-env.bats index dc7affbe8..8addb9dbb 100644 --- a/tests/unit/20_build-env.bats +++ b/tests/unit/20_build-env.bats @@ -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