I am currently using Prisma on a large scale project. When performing a complex query, the Prisma cluster often errors out with the following message in the docker-logs (I'm redacting the error for readability):
{"key":"error/unhandled","requestId":"local:ck7ditux500570716cl5f8x3r","clientId":"default$default","payload":{"exception":"java.util.concurrent.RejectedExecutionException: Task slick.basic.BasicBackend$DatabaseDef$$anon$3@552b85a4 rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@1d4391f7[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 43440]","query":"query ($where: TaskWhereUniqueInput!)
{\n task(where: $where) {\n workflow {\n tasks {\n id\n state\n parentReq\n frozen\n parentTask {\n id\n state\n }\n }\n }\n }\n}\n","variables":
"{\"where\":{\"id\":\"ck6twx873bs550874ne867066\"}}",
"code":"0","stack_trace":"java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)\\n
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
...
"message":"Task slick.basic.BasicBackend$DatabaseDef$$anon$3@552b85a4 rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@1d4391f7[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 43440]"}}
This is a frequent error when handling large queries. Has anyone come up with a way to configure Prisma or do internal batch operations to avoid this concurrency error?