Docs/Candor Deploy
Troubleshooting deploys
Where to look when a build fails, an app does not start, a domain will not verify, or a deploy is refused.
Start with the log. Almost every failed deploy says why, in the last lines before it stopped.
Where the logs are
- Build log. Open the project’s Deployments tab and open the deployment. The log is the record of that build, and it streams live while a deployment runs.
- Runtime logs. Open Monitoring & Logs, then Logs. This is your app’s own output: what it printed when it started and since.
- Request logs. The same tab shows the HTTP requests that reached your domains, with status codes.
A build that fails does not replace the version that is running. You can fix the problem and deploy again without your site going down in between.
The build failed
Read the last lines of the build log. The usual causes:
- Wrong build command or working directory. Check them on the project’s configuration screen. In a monorepo, check that the right app was chosen.
- A variable is missing at build time. Frameworks that read variables during the build, such as
NEXT_PUBLIC_values in Next.js, need them set in the project environment before the build. - The framework was detected wrongly. Correct it on the configuration screen, or add a
Dockerfileso there is nothing to detect. See Builds and configuration. - The build ran out of memory. Large builds can exceed what the server has free. Try a smaller build (fewer parallel jobs, no source maps), build with a
Dockerfilethat does less work, or give the server more room.
The build passed but the app does not respond
- The port. Your app must listen on the port in the
PORTenvironment variable, on0.0.0.0. An app listening onlocalhost, or on a port of its own choosing, starts but cannot be reached. - It crashed on start. Open the runtime logs. A missing environment variable or a database that could not be reached is usually on the first lines.
- The server ran out of memory. The projects on a server share its memory. If the runtime log ends abruptly with no error of the app’s own, the server may be full. Grow the server to a larger size (managed servers), move some projects to another server, or add a server. See Where your apps run.
- No domain is attached. An app with no domain builds and starts, but nothing routes to it. Add one under Domains & Routes.
The domain will not verify
See Domains and HTTPS. In short: check that the DNS record matches the one in the panel exactly, remove old records for the same hostname, wait for DNS to spread, and press Verify again.
The deploy was refused
- “Your free trial has ended.” Choose a plan under Billing. Running apps are not affected. See Plans, trial and billing.
- A host mount was refused. Volumes must be named volumes such as
data:/data. Paths on the host, the Docker socket and privileged containers are not allowed.
Data disappeared after a deploy
A container’s filesystem is replaced on every deploy. Files your app writes must go to a volume or a database. See persistent storage.
Changes to environment variables did nothing
Saving a variable does not restart the app. Press Apply environment changes, or redeploy. Values used during the build need a redeploy that rebuilds.
Going back
If a new version is misbehaving, roll back first and investigate second: Deployments, open the menu on the last good deployment, Rollback to this version. Rolling back does not undo database changes. See Rollback.
Still stuck
Contact us with the project name and the time of the failed deployment. Do not send secrets or tokens.
Something here wrong, unclear or missing? Tell us. Docs get fixed like bugs.
Not a customer yet? Start a free trial, or see plans and limits.