8 Replies
I don't think it's possible. What is your use case?
i found a way
but if you answared i have another question : ))
if is possible
: ))))
how may instance of prisma clients can i have active? i have somthing like this const databaseUrl = this.configService.get('DATABASE_URL').replace('public', ${this.request.headers['x-tenant']}_tenant);
const client = new PrismaClientTenant({ datasourceUrl: databaseUrl });
return client; i have a this warn(prisma-client) This is the 10th instance of Prisma Client being started. Make sure this is intentional.
Ah, I misunderstood your requirement 🙂
Regarding the error you are observing, can you upgrade to the latest prisma version, i.e. 5.17.0?
The warning should go away
Ideally, you should only have one active instance
GitHub
Remove or change `This is the 10th instance of Prisma Client being ...
The warning is not as important anymore as when we ran the query engine as a binary, potentially not relevant anymore at all. Let's figure that out and remove or change it. Relevant code: https...
I have a multi tenant aplication and I don’t know very good how ti handle the connection I made a new prisma client for every tenant is there a better approach?
Does each tenant have a different database?
each tenant have a differite schema