"Timed out fetching a new connection from the pool" message is misleading
See original GitHub issueBug description
It’s not really a bug, but a misleading message that could be improved. The Timed out fetching a new connection from the pool. Please consider reducing the number of requests or increasing the `connection_limit` parameter (https://www.prisma.io/docs/concepts/components/prisma-client/connection-management#connection-pool). Current limit: 1.
message hints that we should either reduce requests count or increase the connection limit parameter.
Now the reducing of requests is valid as I have faced it. But the two suggestions can be misleading in situations like:
1- Using lambda and having set the connection_limit to 1 as a temporary fix for the connections depletion issue. 2- Failure to connect to a database in cases like: - database being in private subnets with no public internet access. - misconfiguration on the AWS/provider side that caused a database in a public subnet to not be publicly accessible.
How to reproduce
Any of the scenarios above
Expected behavior
What I suggest is that it keeps the starting part of the message saying that it timed out while getting a connection, but improve the second part by saying something like:
This could happen due to multiple reasons like...
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
That is possible that the mismatch still existed there. If possible, update to a recent version and see if the same misleading error happens again.
Besides that, the error message in general is not the best and the advice to change the pool size / connection limit might not be the best any more. We will look into that.
Unfortunately no, since this happened a while ago. The issue basically was the database being inaccessible from lambda for reasons like missing internet gateway or wrong security groups, etc.