Skip to content
Docs

New version didn't answer its health address

Your app must listen on 0.0.0.0 and the port in PORT (8080), and answer its health address with a success. Until it does, the version before keeps serving.

Updated 22 Oct 20262 min read

The whole message:

text
The new version didn't answer its health address in 120 seconds.

The fix on Tanzahost: make your app listen on every address (0.0.0.0) and on the port in the PORT variable, which is 8080. Then make sure its health address, / unless you chose another, answers with a success (any status from 200 to 399).

Nothing is broken for your visitors while you fix it: a version that never answers is removed, and the version before keeps serving.

What the message says

Our deploy waits up to 2 minutes for the new version to answer, asking every second. The message ends with what it saw last:

The end of the messageWhat it means
It didn't answer at /.Nothing listened on port 8080 on the app's own address. The app listens on another port, or only on localhost or 127.0.0.1.
It answered 404 at /.The app runs, but has no page at its health address. Choose a path it does answer.
It answered 500 at /.The app runs, but the page failed. The deploy shows the app's last 50 log lines: the reason is usually there.
It answered 400 at /.The app refused the request's host. For Django, see DisallowedHost.

If instead it says "The new version stopped (code 1) before it answered.", the app crashed while starting. Its last log lines show why.

Listen on PORT

We start the frameworks we detect on PORT already, like next start -p ${PORT} or gunicorn shop.wsgi:application --bind 0.0.0.0:${PORT}. Your own start command, or your own server code, has to do the same. In Node.js:

js
app.listen(process.env.PORT || 8080, "0.0.0.0");

In Python, with Flask's development server swapped for gunicorn:

Terminal
gunicorn main:app --bind 0.0.0.0:${PORT}

A server bound to 127.0.0.1 answers only inside its own sandbox, so our check, and your visitors, can't reach it.

Choose another health address

If / needs a login or a database, give the check a lighter page. Laravel 11 and newer answer /up. Set it under Build and run, in Health address, or in tanzahost.json:

json
{
  "health": "/up"
}

What visitors see

Visitors never see a version that failed its check. If your live app stops answering later, visitors of its address see our "Not answering" page: "This site isn't answering right now. Try again in a minute." Look at the app's logs to see why it stopped.