Programming guide

Debug a failed deployment

Separate build, configuration, startup and routing failures so each test answers one useful question.

Estimated time: 30–60 minutesUpdated: 27 September 2026

Step by step

  1. Capture the exact failure

    Save the command, timestamp, commit, environment and first relevant error. Do not begin by changing several things.

  2. Locate the failing stage

    Decide whether dependency install, build, migration, process startup, health check, DNS or application routing failed.

  3. Reproduce the narrowest layer

    Run the same build command and runtime version locally or in an equivalent clean environment. Test configuration presence without printing secrets.

  4. Change one cause and redeploy

    Record the hypothesis, expected result and observed result. Roll back if the change introduces new uncertainty.

Ready-to-use checklist

  • Commit and environment recorded
  • First relevant error saved
  • Failing stage identified
  • Runtime and config compared
  • One change tested at a time
  • Health route verified

Common problems

Build succeeds but the service is unhealthy

Inspect the start command, bind address, assigned port, migrations and startup time before changing application logic.

It works locally only

Compare runtime versions, case-sensitive paths, ignored files, environment variables and network dependencies.