Deploy logs

Use deployment logs to understand why a deployment failed.

We plan to extend deployment logs functionality.

# Availability

  • Deploy logs are available in the Dashboard; each deployment has its own log.
  • Deploy logs appear shortly after the deployment ends.
  • Deploy logs are only kept for 14 days after the deployment has finished.

# Common issues for failed deployments

It's possible, but not very likely, that failed deployments are caused by a service issue. In most cases they are related to problems in your code and config — likely the with build commands or post deploy commands.

It's also completely normal to see failing deployments while you are still setting things up.

# Build command errors

If the deployment is marked as failed and deploy log shows errors and no new code is deployed, most likely the build steps have failed. Read the error message carefully to understand what went wrong. Sometimes build commands are pre-configured by software templates. In some cases these defaults don't match your project and need adjustment.

# Composer errors

Composer errors are usually caused by configuration issues in your project. Check your composer.json (and lock file) for:

  • Invalid or conflicting version constraints
  • Missing PHP extensions
  • Repositories or packages that are no longer available

# Node.js errors

Node task errors when running npm run prod or similar scripts are also common.

  • Are all Node dependencies installed?
  • Is the task defined in your package.json?
  • Does the task succeed in your local development environment?

# Post deploy command errors

If the deployment is marked as succeeded, but the log shows errors and the code is actually deployed, the problem is most likely with the post deploy commands. These run after the deployment and can fail even though the new code is already live.

# How to fix failing deployments

Use the deploy logs to see where the process breaks and what the error message is. Many issues can be resolved just by carefully reading and following the hints from the log.

A frequent problem is a mismatch between local and remote environments: on fortrabbit the environment is usually set to production, while locally you might still be running a development build. Try running your production build locally (for example npm run build or composer install --no-dev) and fix any issues you see there first.

# Contacting support

We're happy to help you figure out why your deployment fails. When you contact support, please include:

  • Details about your project and environment
  • What you changed before deploying
  • The time of the failing deployment
  • The specific error message or relevant excerpt from the deploy log

Found a tpyo?Edit