Troubleshooting
Application Won't Start
Fix an app that builds but crashes, keeps restarting, or never reaches Running, from binding to 0.0.0.0 to the start command and missing variables.
If the build passes but the application keeps restarting or never reaches Running, the problem is at runtime. Open the Logs tab and watch what happens just after a deployment.
Common Causes
- Not listening on the right address. Your app must bind to
0.0.0.0, notlocalhost, and to the port you exposed in Networking. - A wrong start command. The start command runs as a direct exec, not through a shell.
If you use
&&,$VAR, or pipes, wrap it:sh -c "…". See Build Configuration. - Missing configuration. A crash on boot is often a missing environment variable or database setting. Note that environment changes apply on the next deployment, so use Save & deploy.
- Crashing on startup. Read the runtime logs for the stack trace and fix the error, then redeploy.
Related
Build Failed
Read the build log to fix a failed deployment, from a missing lockfile or Dockerfile to the wrong build method, a failing build step, or build filters.
Port Not Detected
Fix an app that shows Running but whose URL times out or returns nothing by binding to 0.0.0.0, matching the port, and making the port public.