bun
bun copied to clipboard
Memory leak with prisma
What version of Bun is running?
1.0.25+a8ff7be64
What platform is your computer?
Linux 6.6.9-zen1-1-zen x86_64 unknown
What steps can reproduce the bug?
Repeatedly calling prismaclient.findmany()
Example and reproduction steps here: https://github.com/lobomfz/prisma-bun-memleak
What is the expected behavior?
Memory usage should stabilize and lower after stress is done
What do you see instead?
Memory usage keeps grows from 150mb to 500mb in a few seconds and doesn't stop growing. Got to 10gb in less than an hour.
Additional information
This does not happen with Kysely and doesn't happen with node (if it does, to a negligible extent)
engineType = "binary" doesn't work at all
Thanks for reporting this and the reproduction
Related issues:
https://github.com/oven-sh/bun/issues/7864 https://github.com/oven-sh/bun/issues/7864
Related issues:
#7864 #7864
Yes, we also encountered that issue and been running on 1.0.18 ever since 1.0.19 came out, but this memory leak occurs on all versions, including 1.0.18