23 days ago
Hi Railway Team,
I am writing to report an issue regarding the memory metrics displayed in my dashboard.
Currently, the memory usage graph for my service is showing a flat line at exactly 1GB. I am certain that the actual memory usage should fluctuate based on the application's activity, with clear peaks and troughs depending on the workload. However, the dashboard does not reflect these changes and remains stuck at 1GB.
Could you please look into the following?
- Why is the metric stuck at 1GB? (Is this a reporting bug or a display limitation?)
- How can I access more granular and detailed memory metrics?
- Is there a way to see the actual memory consumption rather than just the provisioned limit?
Pinned Solution
23 days ago
Yeah, if the JVM allocated 1.05GB it would still show as ~1GB on a GB scale axis
I hope I'm not confusing you, lol.
7 Replies
Status changed to Open Railway • 23 days ago
23 days ago
What are you hosting?
I know that Java applications, for example, can allocate a X amount of memory keeping the usage steady at that amount even if the application actually uses less than that.
medim
What are you hosting? I know that Java applications, for example, can allocate a X amount of memory keeping the usage steady at that amount even if the application actually uses less than that.
23 days ago
I'm using Java. What you're saying is that if the JVM only needs 1GB of memory right now, it only shows 1GB? And if the JVM borrows more than 1GB, it would then show 1.1GB, 1.2GB, etc.?
medim
What are you hosting? I know that Java applications, for example, can allocate a X amount of memory keeping the usage steady at that amount even if the application actually uses less than that.
23 days ago
But why does it show in increments of 10 when it's 900MB, but when it's in GB it doesn't display in MB units?
youngsuk-kim
I'm using Java. What you're saying is that if the JVM only needs 1GB of memory right now, it only shows 1GB? And if the JVM borrows more than 1GB, it would then show 1.1GB, 1.2GB, etc.?
23 days ago
The JVM pre allocates memory from the container (you can set max and min with flags), Railway is probably seeing the entire pre-allocated block as "used" (which it is) even if the Java app is internally only using a fraction of it.
youngsuk-kim
But why does it show in increments of 10 when it's 900MB, but when it's in GB it doesn't display in MB units?
23 days ago
I would say that it's just how it works? It's auto scaling the unit, at lower values it shows finer increments and at higher values it switches to coarser units.
medim
I would say that it's just how it works? It's auto scaling the unit, at lower values it shows finer increments and at higher values it switches to coarser units.
23 days ago
So what you're saying is that because it's displaying in GB units, if it's allocated 2GB, it just shows as 2GB?
youngsuk-kim
So what you're saying is that because it's displaying in GB units, if it's allocated 2GB, it just shows as 2GB?
23 days ago
Yeah, if the JVM allocated 1.05GB it would still show as ~1GB on a GB scale axis
I hope I'm not confusing you, lol.
Status changed to Solved medim • 22 days ago