Skip to content

Health Check Failures

Your deployment built successfully and the container started, but the health check timed out. The deployment is stuck at HEALTH_CHECKING and eventually fails. Here’s how to debug it.

Open the deployment in the dashboard and go to the Logs tab. Look for:

  • Application startup errors — Exceptions, missing config, or crash messages.
  • Port binding messages — Your app should log which port it’s listening on. Compare this to the port configured in service settings.
  • “Listening on…” — If you see this message, the app started. The issue is likely a port or path mismatch.

If the logs show nothing (empty), the container probably crashed immediately. See Container Crashed.

The most common cause of health check failures is a port mismatch. Clank probes http://container:{port}{path}. If your app listens on port 3000 but the service is configured for port 8080, the probe gets “connection refused.”

FrameworkDefault port
Node.js / Express3000
Next.js3000
Python / Flask5000
Python / Uvicorn8000
Go8080
Ruby / Rails3000

Fix: Update the port in your service settings to match what your app actually listens on.

Clank sends a GET request to the configured path. If the path doesn’t exist, you’ll get a connection that works but no successful response.

Fix: Set the path to any endpoint your app responds to. / works for most web applications. You don’t need a dedicated /health endpoint.

Step 4: Check if the app needs more startup time

Section titled “Step 4: Check if the app needs more startup time”

Some applications (especially Java/JVM, large Python/Django, or apps that run database migrations on startup) take longer than the default health check window.

Default window: 30s grace + (3 retries × 10s interval) = ~60 seconds total.

If your app needs more time:

  1. Increase the startup grace period (e.g., 60 seconds instead of 30).
  2. Increase the retry count (e.g., 6 instead of 3).
  3. Or both.

Step 5: Check for missing environment variables

Section titled “Step 5: Check for missing environment variables”

Applications often crash silently or hang when a required environment variable is missing. Common culprits:

  • DATABASE_URL — App tries to connect to a database, hangs on connection timeout.
  • SECRET_KEY — Framework refuses to start without it.
  • API_KEY — App starts but throws an error on the first request.

Fix: Review the service’s Environment tab. Check your application’s documentation for required variables.

Build and run the container locally to confirm it starts and responds:

Terminal window
docker build -t myapp .
docker run -p 3000:3000 -e DATABASE_URL=... myapp
curl http://localhost:3000/health

If it works locally but fails on Clank, the issue is likely an environment variable, port configuration, or resource limit difference.

SymptomLikely causeFix
”Connection refused” in logsWrong port configuredMatch port to app’s listen port
No logs at allContainer crashing on startCheck for missing env vars or entrypoint errors
Logs show app startedWrong health check pathSet path to / or a valid endpoint
Works locally, fails on ClankMissing env var or resource limitCompare env vars and resource settings
Intermittent failuresApp starts slowlyIncrease startup grace and retries