Why does my sleeping app use RAM?

braddillman
FREE

2 months ago

I'm just trialing Railway, only uploaded a Docusaurus node so far. I just changed to Serverless this morning, and it shows my app is sleeping. But my RAM use is still 300MB. What is that RAM used for? Why isn't it zero if the app is sleeping?

I understand I could remove the deployment to get it zero, probably, buy I don't want that since I'll still exercise it from time to time while I kick the tires. But if I go ahead with full deployment I want to know if I'll be paying for RAM 24/7 while the app is idle. I expect a lot of idle time when I first start out.

Solved

9 Replies

2 months ago

Hey, RAM usage shouldn't accumulate when your application is sleeping. Can you provide evidence or elaborate where you get the information of your application still using 300MB of RAM while sleeping?


uxuz

Hey, RAM usage shouldn't accumulate when your application is sleeping. Can you provide evidence or elaborate where you get the information of your application still using 300MB of RAM while sleeping?

braddillman
FREE

2 months ago

I'm looking at my service metrics graph. It was 400MB before I got it sleep, that dropped to 300MB when it was re-built and re-deployed when I changed the service setting to Serverless. So if my RAM usage isn't increasing, what is that graph showing on my service?


braddillman
FREE

2 months ago

Screen shot didn't upload, not sure why.


braddillman

I'm looking at my service metrics graph. It was 400MB before I got it sleep, that dropped to 300MB when it was re-built and re-deployed when I changed the service setting to Serverless. So if my RAM usage isn't increasing, what is that graph showing on my service?

2 months ago

The service graph seems to continue to display the previous value after your app has gone to sleep, if the time window includes your app's resource usage before it went to sleep.

Please add a memory usage block via your project's observability tab. The memory usage block actually shows that an app went to sleep.

Attachments


uxuz

The service graph seems to continue to display the previous value after your app has gone to sleep, if the time window includes your app's resource usage before it went to sleep.Please add a memory usage block via your project's observability tab. The memory usage block actually shows that an app went to sleep.

braddillman
FREE

2 months ago

OK I added a memory usage block via my project's observability tab. Tried several times, each one still shows use of 300MB. I don't see in that chart that my app went to sleep, but in the dash board it correctly shows it's asleep.

Attachments


braddillman
FREE

2 months ago

Here's what I'm seeing. The 2 memory blocks look the same, left is just 'learn' service, right is all services. I can't explain the network egress either, it's just a Docusaurs node with no traffic, though I'm not concerned about that (except where it prevents my app from sleeping, but is reported to be asleep, I believe it is).

Attachments


2 months ago

I believe that this is a UI bug, I can replicate it if I filter the memory usage by a singular service only.I'll let the team know by raising this to them.

While not ideal, another way of checking if your app is indeed not consuming any resources while sleeping is to check its cumulative usage, which should not increase if they are indeed sleeping. https://railway.com/workspace/usage > click on a project > View Cost by Service.


braddillman
FREE

2 months ago

Yeah, I did notice the cost went down. For now I'll assume it's just a UI bug. I don't take this as a red flag with respect to adoption. Thanks!


braddillman

Yeah, I did notice the cost went down. For now I'll assume it's just a UI bug. I don't take this as a red flag with respect to adoption. Thanks!

2 months ago

You are welcome, I have reported this UI bug in the Railway Discord. I'll mark this thread as solved if you don't have any further questions.

Attachments


Status changed to Solved uxuz 2 months ago