I keep getting `Already 10 Prisma Clients are acti...
# prisma-client
t
I keep getting
Already 10 Prisma Clients are actively running.
showing up in my terminal where I've ran
prisma studio
after a few minutes. I'm only instantiating the PrismaClient once when my app launches. This has been the case in the past year but I've only recently started getting this warning so I can't pinpoint the cause. Any help would be gladly appreciated
r
@Torrino ๐Ÿ‘‹ Would you be able to create a reproduction of this? If so, we would like to investigate why this occurs so it would be great if you could add this here ๐Ÿ™‚
t
I'm more than willing to add it as an issue on github but I'm not sure it's an issue anyone could reproduce. I feel as if though it's an issue only on my side but I'm not sure the reason ๐Ÿ˜ž Any next steps you think I should take?
r
Are you using Next.js or is this a simple backend service?
t
It's a simple backend service. Not using Next.js
r
I would suggest restarting the app and/or database to see if this occurs again. It most probably would be due to an open connection somewhere but canโ€™t pinpoint it. Also are you using hot-reloading for the service when working in development? That might be causing multiple
PrismaClient
to instantiate.
t
Tried restarting multiple times but the warn keeps coming up. I've also just tried running prisma studio without running my application and after a minute, the warning came up again so this means it has nothing to do with my app code since the app wasn't even running?
And no, haven't been using any hot-reloading at all (unless ts-node-dev with the
--respawn
flag is considered hot-reloading)
r
What version of Prisma are you on? And are you using the Electron version of Studio or the command line?
t
Okay I've tested it again; ran
prisma studio
(without even running my backend application) and waited a bit but nothing happened. I've made one edit to a data in a row and saved the changes, nothing again. After making a second edit to the same table, the warning came up.
Prisma Version 3.1.1 and terminal version of Studio
Is there still any hope for me fixing my issue @Ryan