> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fjall.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ecs.health_check_failed

> The new version failed its container health checks

Tasks from your new version started, but the container health check never reported healthy, so ECS stopped them and the rollout failed. The failure came from the application's code or configuration.

## Why this happens

A container health check probes the application on a fixed schedule after start. The check fails when:

* The application is not listening on its configured port. The process starts but binds a different port, or fails to bind at all.
* The health-check path is wrong. The check requests a route the application does not serve, so every probe returns an error.
* The start period is too short for a slow boot. The application is still initialising when the first probes run, and ECS counts those failures against it.

The deployment failure sits in the `ecs_stabilise` phase. The provider reason from ECS may include the stopCode for the failed tasks.

## How to fix it

1. Check the container health-check command and its start period. Confirm the command probes a route the application serves and that the start period covers your slowest boot.
2. Confirm the application listens on its configured port. Compare the port the process binds at startup against the port the service and health check expect.
3. Test the check locally. Run the image, wait for it to boot, then run the health-check command against it. It should succeed within the configured interval.
4. If the boot is legitimately slow (cache warming, large framework startup), extend the start period so the first probes land after the application is ready.
5. Deploy again once the check passes locally.

## What Fjall shows you

The deployment's detail page on fjall.io shows this code, the affected service, the verbatim ECS reason, and the deploy-time ECS event tail. The CLI prints the same information in its Error Detail block, and the deployments list shows the failure title on the deployment's row.

## Related

<CardGroup cols={2}>
  <Card title="Deployment safety" icon="shield-check" href="/deployment/deployment-safety">
    How the circuit breaker and the ECS event tail protect your rollouts.
  </Card>

  <Card title="Deploy an application" icon="rocket" href="/deployment/deploy-application">
    The full deployment flow, phase by phase.
  </Card>

  <Card title="fjall deploy" icon="terminal" href="/cli/deploy">
    Deploy from the CLI and read its failure output.
  </Card>

  <Card title="fjall releases" icon="list-check" href="/cli/releases">
    Check what is currently running after a failed rollout.
  </Card>
</CardGroup>
