4 months ago
Hello Railway Team,
I understand that when a service has been idle for a certain time, it enters the "Sleeping" state and does not incur compute charges.
However, I would like to clarify:
- When the service is in "Sleeping" state, is all allocated RAM fully released?
- Or does Railway still keep part of the memory allocated until the next wake-up?
It would be helpful to know if the memory usage shown in the Metrics chart after sleeping is just the last recorded value, or if it reflects actual RAM usage during sleep.
Thank you.
7 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
All the memory is freed and you don't get a charge until the service wakes up again so you lose all in-memory-state.
The memory value shown in metrics is the last known value before it went to sleep. The service is more like in suspended mode than sleep.
This feature was formerly called App-Sleeping which I think they renamed it due to confusion to Serverless.
smolpaw
All the memory is freed and you don't get a charge until the service wakes up again so you lose all in-memory-state.The memory value shown in metrics is the last known value before it went to sleep. The service is more like in suspended mode than sleep.This feature was formerly called App-Sleeping which I think they renamed it due to confusion to Serverless.
4 months ago
Thanks for the clarification — that’s exactly the piece I couldn’t find in the docs.
For context: I had read the documentation and confirmed that CPU and network go idle when the service sleeps, but I wasn’t sure whether RAM is fully released because the docs don’t mention memory explicitly. Your note that all in-memory state is lost and that the Metrics chart shows the last observed memory value (not actual usage during sleep) clears it up.
If possible, it would be great to add a line about RAM to the docs to save others the guesswork. Thanks again!
4 months ago
I mean if you were to think about it it's kind of obvious like if you were to remove the public endpoint, no traffic will reach your application so no egress cost and potentially no cpu cost.
If your questions has been answered then please mark it as a solution and close this thread.
smolpaw
I mean if you were to think about it it's kind of obvious like if you were to remove the public endpoint, no traffic will reach your application so no egress cost and potentially no cpu cost.If your questions has been answered then please mark it as a solution and close this thread.
4 months ago
Thanks. I’m happy to mark this as solved once there’s an official doc I can cite. I had checked the docs but couldn’t find anything that explicitly states RAM is fully released during sleep and that the memory metric shown is just the last observed value. If you can share a link (or update the docs), I’ll close the thread. Thanks!
lark
Thanks. I’m happy to mark this as solved once there’s an official doc I can cite. I had checked the docs but couldn’t find anything that explicitly states RAM is fully released during sleep and that the memory metric shown is just the last observed value. If you can share a link (or update the docs), I’ll close the thread. Thanks!
4 months ago
Couldn't find this exact information in the docs but here's a mod @uxuz replying to a similar question: https://station.railway.com/questions/serverless-price-optimization-d1fb1462#eg95
4 months ago
Status changed to Solved chandrika • 4 months ago