Help for owners
My app will not deploy on DigitalOcean App Platform
Short answer
On App Platform, find the failed deployment in the app's Activity tab and read its build logs. Common causes are a failed health check, a port other than 8080, a server bound to localhost, running out of memory, a build that passes 60 minutes, or database and repository access.
Does this sound like your situation?
- The deployment says failed after a code change.
- The build works on a developer's laptop but not on DigitalOcean.
- The app starts, restarts, then fails health checks.
- The error mentions exit code 137 or 127.
- The site works but new changes never appear.
Why does this happen?
The health check cannot reach the app
DigitalOcean says a failing health check means external traffic is not reaching the service at the expected HTTP route. The platform expects services to listen on all interfaces at port 8080, so an app on another port needs the HTTP port setting changed.
Confirmed by docs.digitalocean.com
The server only listens locally
A server bound to localhost or 127.0.0.1 is not exposed externally, so it passes on a laptop and fails on the platform.
Confirmed by docs.digitalocean.com
It ran out of memory
Exit code 137 is a container shut down unexpectedly, usually from running out of memory. DigitalOcean suggests more memory, autoscaling or more containers. An app can also restart repeatedly without showing high memory use, visible as a restart count in Insights.
Confirmed by docs.digitalocean.com
A command or dependency is missing
Exit code 127 means a command was not found, typically because a dependency is missing or not in the path. Other listed errors include a non-zero exit code and a run command that is not executable.
Confirmed by docs.digitalocean.com
The build is too slow or the platform limit is reached
A build job stops after 60 minutes. A ResourceExhausted error means your account or team hit a platform limit, such as on apps, memory, active builds or domains.
Confirmed by docs.digitalocean.com
What can I do about it today?
- Open the failed deployment and read the last linesIn the control panel open the app, then Activity, then the failed deployment. Screenshot the last 20 lines of the log.
- Send that screenshot to your developerThe last lines usually name the step. It is the single most useful thing you can provide.
- Do not change environment variables or the database to experimentA wrong value can break the version that is currently live.
- Check that the live site still worksOpen your site and test the main action. Tell customers only if it is actually affected.
- Check repository and database accessDigitalOcean notes it needs access to the repository, and database connection settings and trusted sources can block the app. Ask whether any account or password changed recently.
- Write down what changed before it failedNew packages, a bigger upload, a new setting or a team permission change. It narrows the cause.
When should I bring someone in?
- The logs show an error you cannot interpret.
- The live site is also down.
- Several deployments in a row fail with different errors.
How do I handle it?
- Read the build and run logs in orderI separate build failures from start-up failures from health-check failures, because the fixes differ.
- Reproduce the platform conditions locallySame Node or runtime version, same port and the same start command, with no hidden local files.
- Fix the smallest cause firstPort and binding, missing dependency, memory, or a slow build, one change per deployment.
- Keep the live version safeI confirm what is running, watch its health after each attempt and keep a way to go back to the last working version.
- Document the settingsThe app spec, environment variable names, port and health check are written down for the next person.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Does a failed deployment take my site down?
I cannot promise that from the pages I read, so check the live site and the current deployment in the Activity tab.
Can I just retry?
A retry can clear a transient platform issue, but if the same error appears the cause is in the app or its settings.
Why does it work on my computer?
Laptops often run on a different port, bind to localhost, have more memory or keep files that the platform does not have.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable.Cloud Run says the container failed to start or the startup probe failed on port 8080TypeError: Cannot read properties of undefined (reading 'views')req.session is undefined in an Express route