FerryDocs
ConceptsSelf-healing

When a container crashes

Docker starts a crashed container again, and the proxy uses the other instances during that time.

Edit on GitHub
BrowserProxyInstance 1Instance 2

Two instances answer the requests.

1 / 5

The containers of a service have the unless-stopped of Docker. Thus Docker repairs most crashes, and the repairs the others.

Three cases

What occursThe repairTime
The process exits or crashesDocker restarts the container.Immediately
The container disappears: you removed it, or its restart failedThe next pass of the reconciler starts a new instance.About 10 seconds
The container has no memory leftThe kernel stops it at its memory limit. Docker restarts it as for each crash.Immediately

For the last case, see Out-of-memory kills.

See it

Terminal
ferry status api

The command shows the number of restarts of each . The service is while it has fewer instances than you asked for.

A service with one instance

During the repair, requests get the answer 503 until the instance is back.

On this page