Memory usage is continuously increasing impacting my Billing
flekhhq
PROOP

3 months ago

Hi Team,

I’m using Railway to host my applications, and I’ve noticed something confusing regarding memory usage.

In the Observability section, I can see that the memory usage is continuously increasing thus the Bill is also increasing. However, when I look at the actual memory usage of all the services I’ve deployed, the total combined usage does not go beyond ~500 MB.

Despite this, the dashboard shows much higher memory usage, and it keeps increasing gradually. I’m unable to understand how this is being calculated or why there is such a difference between the observability metrics and the

dashboard usage.

I’ve attached screenshots of:

  • The memory usage shown in the dashboard

  • The observability section for reference

Could you please help me understand:

  1. Whether this behavior is expected / legit, or

  2. If there might be an issue with how memory usage is being reported or calculated?

Any clarification on how Railway measures and aggregates memory usage would be really helpful. Also, what else in context of railway I can do to reduce the cost?

Thanks

Solved$30 Bounty

Pinned Solution

fra
HOBBYTop 10% Contributor

3 months ago

As we said, the the resources in the dashboard are cumulative, let's say you have just 1 service that uses always only 50mb of ram, the graph of the service will be flat, the graph in the dashboard will increase every day because every day you used some memory....for example (using random values):

  • day 1 you used 100mb

  • day 2 you used other 100mb

  • day 3 use used other 100mb

the graph in the dashboard will have:

  • day 1 = 100mb

  • day 2 = 200mb (day 1 + day 2)

  • day 3 = 300mb (day 1 + day 2 + day 3)

now, from what I can see you have 7 services, just keeping them alive means you are using memory/cpu, 10$ to run 7 services is not a lot, tbh I would expect a lot more....

One suggestion I can give you is to turn off services if you don't need them, in the setting of the service you can enable serverless, this means after 10min (I don't remember if 10min or 15min) the service will turn off automatically, if you send a request to the service it will keep loading for a few second (~10/15sec) and then it will respond, this waiting time is only with the first request (as the service need to "turn on").

Looking at the services graph I don't see any memory leak, the memory is pretty flat and low (always < 200mb) so there isn't much you can do, you just 7 container in use....

What I'd suggest is to merge services/apps if you can, sometime having a lot of micro services (if you are not big with a lot of users) it is just a waste of money...

4 Replies

3 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 3 months ago


fra
HOBBYTop 10% Contributor

3 months ago

The values in the dashboard are a sum of the usage (for example: what you used yesterday + what you used today), so they will always increase


3 months ago

The values shown on the dashboard represent cumulative usage (for example, yesterday’s usage plus today’s usage), so they will always increase over time.


flekhhq
PROOP

3 months ago

I understand that memory usage will increase over time, but my concern is the rate at which it’s increasing. It’s growing very fast, and I don’t believe my actual usage justifies that speed. Can someone clarify why this is happening?


fra
HOBBYTop 10% Contributor

3 months ago

As we said, the the resources in the dashboard are cumulative, let's say you have just 1 service that uses always only 50mb of ram, the graph of the service will be flat, the graph in the dashboard will increase every day because every day you used some memory....for example (using random values):

  • day 1 you used 100mb

  • day 2 you used other 100mb

  • day 3 use used other 100mb

the graph in the dashboard will have:

  • day 1 = 100mb

  • day 2 = 200mb (day 1 + day 2)

  • day 3 = 300mb (day 1 + day 2 + day 3)

now, from what I can see you have 7 services, just keeping them alive means you are using memory/cpu, 10$ to run 7 services is not a lot, tbh I would expect a lot more....

One suggestion I can give you is to turn off services if you don't need them, in the setting of the service you can enable serverless, this means after 10min (I don't remember if 10min or 15min) the service will turn off automatically, if you send a request to the service it will keep loading for a few second (~10/15sec) and then it will respond, this waiting time is only with the first request (as the service need to "turn on").

Looking at the services graph I don't see any memory leak, the memory is pretty flat and low (always < 200mb) so there isn't much you can do, you just 7 container in use....

What I'd suggest is to merge services/apps if you can, sometime having a lot of micro services (if you are not big with a lot of users) it is just a waste of money...


Status changed to Solved flekhhq 3 months ago


Status changed to Solved brody 3 months ago


Loading...