Hi, what's the reason for this <https://github.com...
# prisma-client
j
Hi, what's the reason for this https://github.com/prisma/prisma/blob/c8a179be2547ce9bcc6b1f60285d6fba98ffa03a/src/packages/engine-core/src/BinaryEngine.ts#L274 - I plan to launch ~100 prisma instances on 1 server.. Any thoughts?
r
@James đŸ‘‹ 100 instances on a single server pointing to the same database? You might be better off increasing the
connection_limit
value as shown here and that’s how we recommend this in our docs.
j
Oh, no... we have 100 mysql instances ... so 1 prisma instance per mysql. And for connection_limit, we have 35. (So max connections should be 35 * 100). We vary which PrismaClient to use based on a value in the jwt authentication header.
r
I think a separate PrismaClient per database should work. Also that’s just a warning that it would be resource heavy to run more than 10 Prisma instances on a single instance.
j
before, we had 1 prisma server per mysql db, but as the versions and our db grew, it was taking up 1.2 gb ram so would have cost 120gb ram. I'm hoping an in memory object that holds 100 prisma clients will work and take a lot less than 120gb.