Service limits

Anonymous

2 years ago

Ability to limit a service to a max number of CPUs or amount of RAM used.

Completed

0 Threads mention this feature

13 Replies

anonymousPRO

2 years ago

This would be very useful!


ss-witBIZCLASS

a year ago

+1 would be super useful!


a year ago

would this be desirable though? it would just end up crashing the app as I've seen so many times with apps on the trial plan


ss-witBIZCLASS

a year ago

Bit of a silly example but I'm currently fighting a memory leak in my nextjs app which seems to be a bug (https://github.com/vercel/next.js/issues/60473)

The leak isn't terrible (eg. still below ~2GB after a day), but I'm currently manually restarting my service periodically. In my case, it'd be useful to set a max RAM, and even if the service dies and tries to restart it saves me the time.

Kinda a goofy example, since ideally there's no memory leak! But my 2c



rookHOBBY

a year ago

certainly useful as railway is very susceptible to denial-of-wallet attacks.

if you misconfigure a loop, or get attacked, suddenly you have a 5k or 100k bill. https://serverlesshorrors.com

the best for me would actually be to pay a fixed price for a set amount of cpu/ram per month, then if an unwanted load does happen, your service goes down for a bit, and then recovers without spending any more money.


a year ago

there's no per service limits but I should mention railway does have the option to set workspace wide hard spend limits.

https://docs.railway.app/reference/usage-limits#hard-limit


rookHOBBY

a year ago

a hard limit is a good option to have. however the only way to recover from a hard limit would be to spend more, exposing you to more denial-of-wallet attacks.


a year ago

fair enough


tea-artistHOBBY

a year ago

This is very useful! My Postgres often rushed to 6G of RAM, but it can actually run on 2G of RAM and there is not much difference.


a year ago

If it's currently running on 6 GB of RAM and you limit it to 2 GB, it will crash.


tea-artistHOBBY

a year ago

If it's currently running on 6 GB of RAM and you limit it to 2 GB, it will crash.

We don't actually have much traffic, I guess because the resources are large enough, PG uses memory as cache as possible, because our machine using 2c2g on another copy is also enough to handle the current traffic


3 months ago

Oh boy, we shipped this like 6 months ago. Marking this as completed. Check your service settings.


Status changed to Completed angelo 3 months ago


Service limits - Railway Help Station