Set resource limit on deployments that has volume mounted
ignatij
FREEOP

2 months ago

We are using the Pro plan, so we have 32 gb memory limit per deployment.

For one of our deployments we are using Keycloak as a Docker-based deployment with mounted volume.

Currently per the documentation of Railway there's no way to set a Memory Limit per deployment if the deployment uses a mounted volume.

Per the Keycloak documentation, this is highly recommended as the Keycloak process can expand do ~70% of the container resources.

https://www.keycloak.org/server/containers

Is there a way to set hard limit on deployments that use mounted volumes?

(p.s. can't select the service as it's on a different project probably)

Solved

1 Replies

Railway
BOT

2 months ago

The per-service memory and CPU limits are part of the Replica Limits feature, and since replicas cannot be used with volumes, those limits are not available on volume-backed services. There is currently no alternative way to set a hard memory cap on a service with a volume attached. As a workaround for Keycloak specifically, you could use its own JVM memory flags (like -Xmx) to constrain the process from within the container.


Status changed to Awaiting User Response Railway about 2 months ago


Railway
BOT

2 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway about 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...