zshot/cliDownload

--server-unhealthy-at

CLI
--server-unhealthy-at
REST
CLI only
ValuePERCENT|SIZE

Marks the server unhealthy once memory reaches a percentage of the memory limit, such as 90%, or a size, such as 4GB, 3.5GiB or 512MB. GET /status then answers 503 with the measured memory until the server restarts, while renders continue.

When a cgroup memory limit applies, ZShot measures the container’s working set against the limit, matching Kubernetes and docker stats. Otherwise it measures the machine’s used memory against its total.

On Kubernetes, the readiness probe removes the pod from the Service before the liveness probe restarts it, letting in-flight requests finish. Docker marks the container unhealthy without stopping it; add --server-exit-when-unhealthy to exit and trigger a restart.

Example

CLI Run locally
zshot --server --server-unhealthy-at 90%