From f6877869739049a5e8f82e2f6abfeb980929a1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Fri, 27 Oct 2023 12:31:12 -0300 Subject: [PATCH 1/3] Document new fly.toml deploy timeouts --- reference/configuration.html.markerb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index b353ec58b3..044bbd5753 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -178,6 +178,8 @@ To ensure the command runs in a specific region, such as `dfw`, set `PRIMARY_REG The environment variable `RELEASE_COMMAND=1` is set within the temporary release VM. You can use this to define behavior in your Dockerfile's `ENTRYPOINT` that's conditional on being run on a release VM. +By default, the release command has 5 minutes to complete before it is killed. It is possible to increase or decrease the timeout with `fly deploy --release-command-timeout=10m` or by setting `release_command_timeout = "10m"` in `[deploy]` section of `fly.toml`. + ### Picking a deployment strategy ```toml @@ -235,6 +237,17 @@ Secrets take precedence over env variables with the same name. **Note:** In Apps V2, the [`primary_region` option](#primary-region) sets the `PRIMARY_REGION` environment variable within a Machine and overrides any value set in the `[env]` section. +#### Dealing with timeout errors while deploying a new version + +Everytime `fly deploy` runs, it builds a new docker image, push it to an internal registry and only then goes to update or create machines for the app. Sometimes the image is too large, or the platform is slower than usual pulling the new image layers, triggering the default 2 minutes wait for machine started timeout. + +The good thing is that this timeout can be controlled in two ways, as a command line flag `--wait-timeout`. i.e.: `fly deplopy --wait-timeout=10m` or as a more permanent fly.toml setting: + +```toml +[deploy] +wait_timeout = "10m" +``` + ## The `http_service` section [**Apps V2**](/docs/reference/apps/#apps-v2) **only:** For apps that only need HTTP and HTTPS services, you can replace the `[[services]]` section with this simpler alternative. From 2dbabd62007e4800a0e884ee6550894d5e714b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Fri, 27 Oct 2023 16:16:08 +0000 Subject: [PATCH 2/3] Update reference/configuration.html.markerb Co-authored-by: Andrea Anderson --- reference/configuration.html.markerb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index 044bbd5753..c1e734141e 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -241,7 +241,7 @@ Secrets take precedence over env variables with the same name. Everytime `fly deploy` runs, it builds a new docker image, push it to an internal registry and only then goes to update or create machines for the app. Sometimes the image is too large, or the platform is slower than usual pulling the new image layers, triggering the default 2 minutes wait for machine started timeout. -The good thing is that this timeout can be controlled in two ways, as a command line flag `--wait-timeout`. i.e.: `fly deplopy --wait-timeout=10m` or as a more permanent fly.toml setting: +The good thing is that this timeout can be controlled in two ways, with the `--wait-timeout` option, for example `fly deplopy --wait-timeout=10m`, or as a more permanent `fly.toml` setting: ```toml [deploy] From 99413b1e6051854225301b83d4f544257698998b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Fri, 27 Oct 2023 16:16:18 +0000 Subject: [PATCH 3/3] Update reference/configuration.html.markerb Co-authored-by: Andrea Anderson --- reference/configuration.html.markerb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index c1e734141e..f7546581f6 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -239,7 +239,7 @@ Secrets take precedence over env variables with the same name. #### Dealing with timeout errors while deploying a new version -Everytime `fly deploy` runs, it builds a new docker image, push it to an internal registry and only then goes to update or create machines for the app. Sometimes the image is too large, or the platform is slower than usual pulling the new image layers, triggering the default 2 minutes wait for machine started timeout. +Every time `fly deploy` runs, it builds a new docker image, pushes it to an internal registry, and then updates or creates machines for the app. Sometimes the image is too large, or the platform is slower than usual pulling the new image layers, triggering the default 2 minute timeout waiting for the Machine to be in a started state. The good thing is that this timeout can be controlled in two ways, with the `--wait-timeout` option, for example `fly deplopy --wait-timeout=10m`, or as a more permanent `fly.toml` setting: