Hi friends, has anyone found that `createMany` hol...
# orm-help
k
Hi friends, has anyone found that
createMany
holding onto memory of the node.js application? For more context i am looping overan array split into batches of 100k. And then inserting that 100k into the database. After each loop i notice a spike in the amount of memory the node.js application uses and it never drops (1gb, 2gb, 3gb etc). Overtime my script eventually runs out of memory 100% certain it seems like there is a memory leak in createMany
n
Hey 👋 Can you please open a Bug Report with these details and instructions for reproducing this scenario. Our engineering team could have a look at it and debug the issue.
k
@Nurul I found after i mentioend here there is alread ya github issue about this https://github.com/prisma/prisma/issues/8500 although there has been no progress or response for a while now
a
I've noticed something similar with findMany -- Prisma seems to hold results of findMany even after express/fastify has sent a response to the user in memory. It makes apps running Prisma seem to take up more and more memory over time.
Interestingly, in my case this seems to memory that can be safely garbage collected by the Javascript engine