Skip to content

High memory consumption on front-end server over time #36

@Bentroen

Description

@Bentroen

The Next.js frontend deployment consumes about ~600MB RAM when starting, but rises to almost 900MB over a few days.

Image

This smells like a memory leak somewhere - the backend memory consumption stays relatively the same in comparison.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions