ArchitectureDeploy pipeline
The health check
The engine tests each new instance each second until it passes or the timeout ends.
The engine tests each new instance one time each second. The output of the instance goes into the deploy log.
1 / 4
The three tests
A health check depends on the type of the service.
| Service | The test passes when |
|---|---|
| With a health check path | GET http://127.0.0.1:<host port><path> answers with a status below 400. The Host header is the default host of the service. |
| With a port and no path | The port accepts a TCP connection and does not close it immediately. |
| Background worker | The process still runs 5 seconds after its start. |
The option --health-check-timeout sets the timeout (default 120 seconds). For the user view, see Health checks.
If the kernel killed an instance because of its memory limit, the deploy fails. This is an OOM kill. It fails even when Docker restarted the container: the Docker events of the container tell the engine.
instance ab12cd ran out of memory (limit 512 MiB) — raise the service's memory limitThe failure message gives the usual cause. The app must listen on $PORT on 0.0.0.0, not on 127.0.0.1 in its container.