Skip to content
Permalink
Browse files

remove retries on 5xx. Closes #485

  • Loading branch information...
tj committed Apr 24, 2018
1 parent 5c3e97a commit 6be6c0fa4454aef265cfeaa297dff627ef255c13
Showing with 2 additions and 8 deletions.
  1. +2 −2 docs/04-configuration.md
  2. +0 −6 http/relay/relay.go
@@ -492,7 +492,7 @@ The following settings are available:
- When `app.js` is detected `node app.js` is used
- When `app.py` is detected `python app.py` is used
- `backoff` – Backoff configuration object described in "Crash Recovery"
- `retry` – Retry idempotent requests upon 5xx or server crashes. (Default `true`)
- `retry` – Retry idempotent requests upon server crashes. (Default `true`)
- `timeout` – Timeout in seconds per request (Default `15`, Max `25`)
- `listen_timeout` – Timeout in seconds Up will wait for your app to boot and listen on `PORT` (Default `15`, Max `25`)
- `shutdown_timeout` – Timeout in seconds Up will wait after sending a SIGINT to your server, before sending a SIGKILL (Default `15`)
@@ -522,7 +522,7 @@ By default the back-off is configured as:
- `attempts` – Attempts made before failing (Default `3`)
- `jitter` – Apply jitter (Default `false`)

A total of 3 consecutive attempts will be made before responding with an error, in the default case this will be a total of 700ms for the three attempts.
By default a total of 3 consecutive attempts will be made before responding with an error, in the default case this will be a total of 700ms for the three attempts.

Here's an example tweaking the default behaviour:

@@ -192,12 +192,6 @@ retry:
return res, err
}

// we got an error response, retry if possible
if err == nil && res.StatusCode >= 500 && isIdempotent(r) {
ctx.WithField("status", res.StatusCode).Warn("retrying idempotent request")
goto retry
}

// we got a response
if err == nil {
return res, nil

0 comments on commit 6be6c0f

Please sign in to comment.
You can’t perform that action at this time.