Resource limits

Open an application, then select Configuration > Resource Limits to restrict the CPU and memory available to its containers.

Number of CPUs and the memory-limit fields use 0 for no configured limit. Other fields have their own defaults. Start with measured application usage rather than choosing the lowest possible value.

CPU limits

SettingAccepted valueDefaultBehavior
Number of CPUsA whole or decimal number, such as 2 or 0.5.0Sets the maximum CPU capacity. 0 allows the container to use all CPUs.
CPU sets to useCPU numbers or ranges, such as 0-2 or 0,1,3.EmptyRestricts the container to selected CPU cores. Empty allows all CPU cores.
CPU WeightA whole number of 0 or greater.1024Sets the container's relative CPU priority when containers compete for CPU time.

CPU Weight does not reserve CPU capacity. It changes how Docker shares available CPU time during contention.

Memory limits

Memory fields accept 0 or a whole number followed by b, k, m, or g. The unit is case-insensitive:

256m
1g
SettingAccepted valueDefaultBehavior
Soft Memory LimitA memory value.0Sets the memory reservation Docker considers when the server is under memory pressure.
SwappinessA whole number from 0 to 100.60Controls how readily the container's anonymous memory pages can be swapped.
Maximum Memory LimitA memory value.0Sets the hard memory limit for the container.
Maximum Swap LimitA memory value.0Sets the total memory and swap available to the container.
Low limits can stop the application

A hard memory limit that is lower than the application's working set can cause Docker to terminate the process for running out of memory. A low CPU limit can make health checks time out during load.

Apply and verify

Select Save, then redeploy or restart the application so Coolify recreates its containers with the new limits.

After the application starts:

  1. Open Metrics and confirm CPU and memory usage stays below the configured limits.
  2. Open Logs and check for out-of-memory exits, repeated restarts, or health-check failures.
  3. Send representative traffic to the application and confirm response times remain acceptable.

Read Resource metrics to enable and inspect container metrics.

On this page