Deploy failed

A deploy job ended as failed after the build. Read the message on the job page, then retry, roll back or deploy again.

Symptom

The job page shows the deploy as failed with one of these messages. The site's health ring can show Needs attention while the last job is failed.

The site did not answer its health check after the deploy. Roll back to the previous version, check the log, or fix the repository and deploy again.

EmDash needs its command-line migration for a database of this size. Put a Cloudflare API token that may edit D1 in `CLOUDFLARE_API_TOKEN` and the site's Cloudflare account ID in `CLOUDFLARE_ACCOUNT_ID`. In the site's repository run `npm run build`, then `npx emdash migrate --wrangler-config wrangler.jsonc`, or `npx emdash migrate --d1` followed by the name of the site's D1 database. Confirm the target it shows, as the EmDash core migrations documentation describes, then deploy again.

<Provider> is rate-limiting this connection. Jobs resume at <time>.

A job that Fleet stopped because the provider kept rate-limiting it shows this message. It says "Try again later" in place of the time when the provider gave none.

<Provider> kept rate-limiting this job's requests, so Fleet stopped it. Jobs resume at <time>. If it repeats, contact support and quote job <id>.

<Provider> returned error <code>. Try again in a few minutes. If it fails again, check the provider's status page or contact support and quote job <id>.

A Fleet maintenance restore interrupted this job. Retry it. For a database export, start a new export from the site page.

Fleet stopped this job because it stopped responding. Retry it. For a database export, start a new export from the site page. If it repeats, contact support and quote job <id>.

The build output failed Fleet's safety checks and was not deployed. Run the deploy again. If it fails again, contact support and quote job <id>.

When Fleet can name the reason, the safety-check message is one of these five instead.

A static file in the build output is larger than 25 MiB, the most Cloudflare accepts for one asset. Remove it from the repository or make it smaller, then deploy again.

The .assetsignore file of the build output is larger than 64 KiB, has more than 1,000 lines, has a line with more than two double asterisks, has patterns too costly to match against this many files or is not plain UTF-8 text. Fix .assetsignore in the repository, then deploy again.

The build output holds _worker.js, which Cloudflare would publish as a public file. List _worker.js in the .assetsignore file of the build output in the repository, then deploy again.

The lockfile of the repository (npm-shrinkwrap.json, or package-lock.json when there is none) is missing, larger than 10 MiB or does not record the versions of emdash and @emdash-cms/cloudflare, so Fleet cannot tell which version was built. Run npm install, commit the lockfile, then deploy again.

The build output has a layout or size Fleet does not accept. Build with the fleet-build.yml workflow Fleet wrote into the repository, keep the output to the site's own files, then deploy again.

Cause

The build finished, and a later step of the deploy failed: the health check, a migration, the provider or Fleet's safety checks.

Fix

You need the Developer role or above. Retry asks you to sign in again when your last sign-in is older than 30 minutes.

  1. Read the message on the job page and open the job log.
  2. Do the action for your message below.
  3. Select Retry, or Deploy where the message says to deploy again.

By message:

  • Health check not answered: roll back to the previous version, or fix the repository and deploy again. See Roll back a site. To restore the database recovery point of the deploy, see Restore a database.
  • Migration needs the command line: set the token and the account ID in your shell as the message says. Run the two commands in the site's repository and confirm the target, as the EmDash documentation describes. Then deploy again. See Deploy a site.
  • Rate limit: wait until the time in the message, then retry. When it says "Try again later", retry later. If a stopped job repeats, ask from Support in the dashboard with the job number.
  • Provider error: wait a few minutes and retry. If it repeats, check the provider's status page.
  • Maintenance restore or stopped job: retry. For a database export, start a new export from the site page.
  • Safety checks without a reason, such as an expired artifact or one from another commit: deploy again. A retry of the same build fails the same way, so the job offers none.
  • Static file over 25 MiB: remove the file from the repository or make it smaller.
  • .assetsignore not accepted: fix the file in the repository. It must be plain UTF-8 text of at most 64 KiB and 1,000 lines.
  • _worker.js in the output: list _worker.js in the .assetsignore file in the repository.
  • Lockfile without EmDash: run npm install and commit package-lock.json.
  • Layout or size not accepted: build with the fleet-build.yml workflow in your site's repository and keep the output to the site's own files. Fleet refuses more or fewer than one artifact, another artifact name, an artifact above 200 MB, an archive that is not a valid zip, and a file that is not UTF-8 text where text is required.
  • An error that repeats: ask from Support in the dashboard with the job number. Staff do not retry a failed job for you. See Contact support.

Prevent

Open the site after each deploy, read the job log of a failed one before you start another, and run the EmDash migration of a large database before you deploy. Rollback covers the last 10 versions. See Versions and rollback.

Report a problem with this page