Quick check
Open the failed deployment and read the container logs printed under the error. If you see any of these, the cause is in Cause 1:Cause 1: App is listening on 127.0.0.1 instead of 0.0.0.0
The dominant cause. Your app bound to the container’s loopback interface, so Brimble’s health check (which hits the container from outside) can’t reach it. Most dev/preview servers default to 127.0.0.1 and require an explicit flag or config to bind to all interfaces.
Confirm: look for localhost, 127.0.0.1, or use --host to expose in the container logs.
Fix: bind to 0.0.0.0 in your start command or framework config.
Astro
In your start command:astro.config.mjs:
Vite
vite.config.ts:
Next.js
Express / raw Node
Flask
app.run:
Django
runserver is dev-only — in production use gunicorn or uvicorn:
runserver for a quick test:
Rails
FastAPI / uvicorn
Cause 2: App is listening on the wrong port
Brimble injectsPORT into the container’s environment. Your app must read it. Hardcoding a different port (e.g. app.listen(8080) while $PORT=3000) leaves the port Brimble is checking silent.
Confirm: the container logs show “listening on 8080” (or any number that isn’t the project’s configured port).
Fix: read process.env.PORT. See the same patterns in 502 errors → Cause 1.
Cause 3: App takes too long to start
Brimble’s deploy-time health check has a finite retry window. If your app doesn’t start listening within ~60 seconds, the check times out and the deployment fails. Confirm: the container logs show normal startup activity (DB migrations, model downloads, asset compilation) but never reach the “listening” message before the error. Fix: move slow work out of the boot path.- Run database migrations as a separate step (a pre-deploy command, or a one-off job), not on every container start.
- Pre-download large model files at build time, not at boot.
- For JIT-warmed apps, don’t block listening on warm-up — start listening first, warm up in the background.
Cause 4: Start command exits immediately
The container starts the process, but the process exits (cleanly or not) before binding to the port. Health check hits a dead container. Confirm: the container logs end with “exited”, a stack trace, an exit code, or are empty (no startup output at all). Fix: find the crash.- A missing env var raised at boot → set it under Settings → Environment, then redeploy.
- A typo in the start command → fix it under Settings → Build → Start command. Common:
node ./serve.jswhen the file is./server.js, ornpm startwhen nostartscript exists inpackage.json. - An unhandled promise rejection during boot → add a top-level handler so the failure shows up in logs:
Diagnostic checklist
When you see “Application failed to respond”, verify in this order:- Container logs printed below the error — what was the last line before the deployment was killed?
- Is the start command binding to
0.0.0.0? (Most common cause.) - Is the start command listening on
process.env.PORT? - Did the process print a “listening” message before the error?
- Are all env vars the app needs at boot configured in Settings → Environment?
Next steps
- 502 errors, if a deployment goes Active but doesn’t serve traffic.
- Deployment is stuck, if a deployment never finishes (rather than failing).
- Build failures, if the build itself fails before the deploy phase.
- Build system, for how install/build/start commands are configured.