Running

Resource limits

Set memory and CPU limits per app, applied to each of its containers, in the app's Settings tab: Limits.

GET/PUT /api/apps/{id}/resources: memory_mb (at least 32) and cpu_millis (thousandths of a core: 500 is half a core, 2000 two; at least 10), each null for none. Like the image, a change applies at the next deploy, to every container the app runs: its web replicas and its processes, and its previews', which copy the app's limits when they're made.

A container over its memory is killed and restarted; the replica is then reported "container was OOM-killed". One over its CPU is throttled, not stopped. Without limits a container may use all of its server's.

Not limited: jobs and release commands, which run in one-shot containers of their own.

Autoscaling reads CPU as a share of the limit when there is one.