Deployment Failed? How to Find and Fix the Cause
A failed deployment is frustrating, but it’s rarely mysterious. Chajio Cloud tells you which stage failed and why, and your app keeps running its previous version while you fix it. This guide shows where to look, then walks through the causes we see most often, stage by stage.
On this page
Your app is still up
First, the reassuring part: a failed deployment doesn’t take your app offline. If a previous version was running, it keeps serving visitors until a new version passes its health check. You can take your time.
Where to look
- The failure message. Open the project’s Deployments tab. A failed deployment shows the reason in red, in plain language, and which stage broke: fetching your code, building it, or starting it.
- The build log. Expand the deployment to see everything the build printed. Read it from the bottom up: the real error is usually just above the last few lines.
- The Logs tab. If the build succeeded but your app didn’t start, your app’s own output is here, live. A crash on start almost always prints the reason.
Fetching your code
“Could not access the repository - the GitHub connection may have been revoked”
Your GitHub authorisation expired or was removed. Open the project’s deploy guide, click Reconnect GitHub, and deploy again.
“Branch … was not found on the repository”
The branch was renamed or deleted, for example master to main. Reconnect the repository with the right branch.
“Repository not found or no longer accessible”
The repository was renamed, moved to another account, deleted, or made private after you connected it as a public repository. Reconnect it.
Preparing the build
Before building, the platform decides how: from your Dockerfile if there is one, otherwise by recognising your language and framework.
“No start command could be found” in the log
Your app was recognised, but not how to start it. This is typical for Python apps. Add a Procfile with a web: line, as shown in the Python guide. For Node.js, add a start script to package.json.
“Could not auto-detect how to build this repository”
Nothing the platform recognises was found where it looked. Check Build context points at the folder containing your app’s package.json, requirements.txt or similar. If your stack isn’t detected automatically, add a Dockerfile: see How to Deploy Any App with a Dockerfile.
Building
“The build failed”
Your build command exited with an error. Read the build log from the bottom up. The usual suspects are a package missing from package.json or requirements.txt, a TypeScript or lint error, or a step that needs a variable you haven’t set. Try the same build on your computer: npm ci && npm run build, or docker build . for a Dockerfile.
“npm ci can only install packages when your package.json and package-lock.json are in sync”
Run npm install on your computer, commit the updated lockfile and push. The same goes for yarn.lock and pnpm-lock.yaml.
“Treating warnings as errors because process.env.CI = true”
Builds run in CI mode, where Create React App stops on lint warnings. Fix the warnings, or change the build script to CI=false react-scripts build.
“The build ran out of memory”
Large JavaScript builds, particularly Next.js, Nuxt and Strapi, can need more memory than Node.js allows itself by default. Raise the limit for the build only:
"build": "NODE_OPTIONS=--max-old-space-size=1536 next build"Set it in the build script rather than on the Environment tab, which would also apply it to your running app. If the build still runs out, get in touch.
“The image built but could not be pushed”
A temporary problem storing your build. Deploy again; it almost always goes through.
Starting your app
“The app did not become healthy”
The build worked, but your app either crashed on start or never answered its health check. Open the Logs tab, then work down this list:
- A crash on start. Look for an error in the logs, often a required environment variable that isn’t set or a database that can’t be reached.
- Listening on localhost. Your server must listen on
0.0.0.0. Fastify, Flask’s development server and uvicorn all default to localhost. - The wrong port. Your app should listen on the
PORTenvironment variable. If it’s hard-coded, click Deploy at the top of your project and set Container port in the Configure step to match. - The health check path fails. It must answer with a success response. A path that doesn’t exist (404), needs a login, or errors (500) fails. Change it, in the same Configure step, to a route that always answers, such as
/health. - Django’s host check. Django rejects the health check with a 400 unless it’s answered before
ALLOWED_HOSTSis checked. The Python guide has a small fix.
“The rollout did not complete within … minutes”
Your app took too long to start or to pass its health check. Check the logs for a slow start, such as long migrations or a large cache being built, and move heavy work out of startup where you can.
“This project doesn’t have room to run the app”, or the project’s resource quota is full
Your project’s CPU or memory allocation is too small for the number of copies your plan runs. Contact support to have the project’s resources raised, or upgrade your plan.
Not a build problem at all
“Daily deploy limit reached”
Each plan includes a number of deployments per day. The count resets at midnight (UTC), or upgrade your plan for a higher limit. Rolling back counts as a deployment too.
“… subscription is suspended, so deploys are paused”
Deploys pause while a plan is suspended, usually for an unpaid invoice. Nothing has been deleted: settle the invoice in the billing portal, and deploys resume.
The deploy worked, but the app misbehaves
Calls to an outside service time out
For security, apps connect out to the internet on ports 80 and 443 (websites and HTTPS APIs) and 5432 (PostgreSQL) only. Services on other ports, such as email over SMTP or an external MySQL server, can’t be reached. Send email through your email provider’s HTTPS API instead, and use a managed database for MySQL-style data.
A changed variable has no effect
If the variable is marked Build on the Environment tab, its value was baked in when your app was built. Redeploy to rebuild with the new value. Frontend variables such as VITE_ and NEXT_PUBLIC_ always work this way.
Users get logged out, or uploads disappear
Your app runs as two copies, and each redeploy starts fresh ones. Sessions kept in memory and files written to local disk aren’t shared between copies and don’t survive a deploy. Keep them in a database or external storage.
Roll back while you fix it
If a release that deployed successfully turns out to be broken, don’t wait for the fix. On the Deployments tab, click Rollback to this version on the last good deployment. Nothing is rebuilt, so the previous version is back within moments. Then fix, push, and deploy again.
Still stuck?
Contact support with your project’s name and the time of the failed deployment, and paste the failure message. We can see the same logs you can and will help you get it live.
Learning path
Deploy your first app
- 1
Deploy your app
- 2
- 3
- 4
Keep reading
How to Deploy a Node.js App (Express, Fastify or NestJS)
Deploy a Node.js API or server from GitHub, JavaScript or TypeScript. The two lines of code every app needs, choosing a Node version, and shutting down cleanly for seamless updates.
How to Deploy a Python App (Flask, FastAPI or Django)
Get a Flask, FastAPI or Django app live from GitHub. What to put in your repository, how to tell the platform how to start your app, and the Django settings that trip people up.
How to Deploy Any App with a Dockerfile
Go, PHP, .NET, Rust or anything else: if it runs from a Dockerfile, it runs on Chajio Cloud. The rules your Dockerfile needs to follow, build-time variables, and a worked Go example.
How to Connect Your Domain to Your App (with Free HTTPS)
Put your app on your own domain in three DNS steps. Covers www versus root domains, what each DNS record does, Cloudflare, and what to check when a domain will not verify.
Ready to deploy?
Start on the Free plan: your first month is on us, and every app runs two copies for high availability.