Open sojha-flip opened 5 months ago
are you spawning multiple threads?
I am not. The app is being run asyncio as visible in the main() function I added in the problem description. This problem goes away if I explicitly call connect and disconnet before every request.
await prisma_client.connect()
response = await self._prisma_client.dependencymap.find_first(
where={
...
},
)
await prisma_client.disconnect()
Bug description
Getting RuntimeError('Event loop is closed') for every 2nd request
How to reproduce
Prisma client Connect is called once while starting the server as visible below This is what the main.py file looks like
Every 2nd request fails with the following logs
Expected behavior
Prisma information
Environment & setup