ConceptsResource limits
Set the limits of a datastore
The limits of a datastore apply to its container immediately, with no restart.
Terminal
$ ferry db update app-db --memory 2G --cpu 1Updated datastore 'app-db': memory limit 2 GiB, CPU limit 1 CPUApplied to the running container (no restart).A datastore has one container. Its limits change in place: the container that runs gets them immediately. A service is different, because it needs a restart. See Datastores.
Choose your tool
ferry db create cache --kind redis --memory 256M
ferry db update app-db --memory 2G --cpu 1
ferry db update app-db --cpu default # back to the server defaultferry db show prints the limits as Memory limit and CPU limit.
A limit below the memory that the datastore uses now can fail. It can also cause an OOM kill of the datastore.
If Ferry cannot apply the new limits, it saves them and the error tells you. Run the same update again to try again.
The limits apply for each status.
creating: Ferry applies the limits to the container, or creates the container with them.failed, for example after an OOM kill: the datastore keeps the new limits for its next start.
POST /api/v1/datastores accepts the same fields: memory_limit_mb and cpu_limit.
Ferry also sets the maxmemory of Redis. See Redis and its memory limit.