17 hours ago
I’m looking for some clarification regarding how resource limits are represented in the metrics dashboard, particularly when using Sum mode.
I have a service configured with 10 replicas, where each replica is configured with:
- 24 vCPU
- 24 GB RAM
Based on the documentation, my understanding is that these resources are allocated per replica. Therefore, with 10 replicas, the aggregate resource limit should theoretically be:
- 240 vCPU
- 240 GB RAM
However, when I view the metrics graph in Sum mode, the displayed limit remains 24 vCPU / 24 GB RAM, rather than reflecting the aggregate limit across all 10 replicas.
My understanding of Sum mode is that it should aggregate the resource consumption across all replicas. If that is the case, I would also expect the displayed resource limit to be the sum of the limits of all replicas.
This becomes particularly confusing when looking at memory usage. I have observed an instance where the total memory consumption shown was approximately 30 GB, while the graph indicated that this had exceeded the 24 GB limit. When I checked the memory usage per replica, none of them had crossed 10GB individually.
This raises an important question:
Is the 24 GB memory limit shown in the Sum-mode graph a per-replica limit, or is it actually the total memory limit for the entire service?
The reason I’m particularly concerned about this is that I’m running Playwright tests against this service, and the test execution is frequently being terminated unexpectedly due to what appears to be memory exhaustion.
If each of the 10 replicas genuinely has a 24 GB memory limit, I would expect the service to have an aggregate capacity of approximately 240 GB, in which case seeing the workload fail due to memory exhaustion would be unexpected based on the metrics.
So there seems to be a discrepancy somewhere between the configured replica resources, the limits displayed in the metrics dashboard, and the actual resource availability/behaviour.
Could you please clarify:
- Whether the configured 24 GB / 24 vCPU limits are per replica or apply to the service as a whole.
- How the Sum mode calculates and displays resource limits.
- Whether the 24 GB limit shown in Sum mode is expected behaviour or a metrics/dashboard issue.
- How I can determine the actual aggregate memory limit and memory consumption across all replicas.
- Whether the apparent memory exhaustion causing my Playwright test executions to be terminated could be related to this configuration or metrics discrepancy.
At the moment, the metrics are quite confusing and, based on the behaviour I’m seeing, appear to be inconsistent with my understanding of the configured resources.
I’d appreciate your help in understanding what is actually happening here and, if possible, how I can accurately monitor the resource limits and consumption of a replicated service.
Thank you.
2 Replies
17 hours ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 17 hours ago
10 hours ago
Railway resource limits (e.g., 24 GB RAM / 24 vCPU) apply strictly per replica, not as a shared global pool. In Sum mode, the dashboard aggregates total usage while displaying the individual replica's limit line, creating a false visual impression of a threshold breach. Playwright crashes are typically caused by load spikes hitting a single replica's isolated limit, triggering an Out-Of-Memory (OOM) termination. To troubleshoot, use Average mode for accurate monitoring, restrict Playwright parallel workers, or increase replica count.
an hour ago
- The 24 applies to a replica. (https://railway.com/pricing)
24 GB/vCPU allocated to the service means it can use up to 24 GB/vCPU. However, the y-axis of the graph will only display the limit of a single replica (24 for your case). For the aggregate memory limit across all replicas, it's still 24 GB limits across each replicas, not a big 240 pool. And no, these configurations wouldn't cause process terminations. It's also possible that the terminations are caused by PID exhaustions.