2 years ago
Ability to limit a service to a max number of CPUs or amount of RAM used.
0 Threads mention this feature
13 Replies
2 years ago
This would be very useful!
2 years ago
+1 would be super useful!
2 years 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
2 years 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
2 years 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.
2 years ago
there's no per service limits but I should mention railway does have the option to set workspace wide hard spend limits.
2 years 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.
2 years 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.
2 years ago
If it's currently running on 6 GB of RAM and you limit it to 2 GB, it will crash.
2 years 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
10 months ago
Oh boy, we shipped this like 6 months ago. Marking this as completed. Check your service settings.
Status changed to Completed angelo-railway • 10 months ago