u/BhavyajainTheBest

▲ 9 r/bun+1 crossposts

Memory Leak with bun and mongodb

I am using bun react template ( bun init --react ), hono and mongodb atlas database.

I see the RSS memory usage keeps on increasing.

If I do not connect to mongodb, it is stable.

So the issue seems to be with mongoose and bun.

Is there any solution? I am using it in production and it crashes my server every few weeks due to high memory usage.

Thank you for your time.

EDIT:

Versions
Bun : 1.3.7
Mongoose : 9.3.3
Hono : 4.12.9

reddit.com
u/BhavyajainTheBest — 6 days ago