4 months ago
I experience high ram usage when using bun, express and mongoose on railway. It would start at 150mb then go up too 600mb over a few hours.
I thought it was just me and my code but I have found other people experiencing the same issue using bun, could railway find a fix for it when deploying to the platform?
4 Replies
4 months ago
Hello,
As much as we would like to be able to do something here, memory leaks in user applications are far outside of our control.
This is something you would have to debug on your end.
Yeah I understand, I just saw a screenshot of someone else having the same issue on railway and thought it might've been just railway issue.
4 months ago
Fortunately, memory leaks are not exclusive to Railway.
4 months ago
Could you provide me with a reproduction? You can email me at conner@bun.com
connerlphillippi
Could you provide me with a reproduction? You can email me at conner@bun.com
a month ago
a month ago
What I'd suggest it to do take a snapshot of the app just after the start, run some load test script, take another snapshot, run the load test script, take another snapshot and investigate if you can fins something useful in the snapshots.... (you might need to run 5/10k requests to see something)
I hope is ok to share an external link:
https://kentcdodds.com/blog/fixing-a-memory-leak-in-a-production-node-js-app
but this can give you a bit more context and maybe teaching you how to debug memory leaks
fra
What I'd suggest it to do take a snapshot of the app just after the start, run some load test script, take another snapshot, run the load test script, take another snapshot and investigate if you can fins something useful in the snapshots.... (you might need to run 5/10k requests to see something)I hope is ok to share an external link:https://kentcdodds.com/blog/fixing-a-memory-leak-in-a-production-node-js-appbut this can give you a bit more context and maybe teaching you how to debug memory leaks
a month ago
It's an issue with bun not my code, other people are also having the same issue https://github.com/oven-sh/bun/issues/12117.
Status changed to Solved samgordon • about 1 month ago
Status changed to Open samgordon • about 1 month ago
Status changed to Solved samgordon • about 1 month ago