-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
The Next.js frontend deployment consumes about ~600MB RAM when starting, but rises to almost 900MB over a few days.
This smells like a memory leak somewhere - the backend memory consumption stays relatively the same in comparison.
This is particularly concerning because memory consumption accounts for >90% of our Railway bill :) so being smart about it could mean a better use of our contributors' generous donations.
Of course, the best approach would be to investigate why this happens and mitigate it. But a possible workaround would be to restart the service periodically. From this thread in Railway support, this is not a feature currently offered by the service, but allegedly this Railway template allows this possibility by offering scheduled restarts via cron
.
It may also be worth exploring using more efficient, alternative JavaScript runtimes, such as Bun -- some people have reported shorter build times and overall better resource usage with it.