Open Jolg42 opened 2 years ago
Context: popped up in an internal Slack discussion where a user was having problems and the Prisma Client error message were
Can’t create more than max_prepared_stmt_count statements (current value: 16382)
and
Timed out fetching a new connection from the connection pool
.
https://prisma-company.slack.com/archives/CEYCG2MCN/p1642671709022300
This is not really a feature we want our users to actually use and play around with, as it concerns an area that our users should optimally never have to worry about. Especially if they start trying this randomly for Timed out fetching a new connection from the connection pool.
then this will just lead to more confusion and wasted time.
What we might want to do is to create an issue for the other error message, properly describe when that might occur and how statement_cache_size
could help fix that potentially.
FYI the docs in the source seem to be wrong as both numbers are defaulted to 100:
Only found in rust source code as of today see: https://sourcegraph.com/search?q=context:global+repo:github.com/prisma/+statement_cache_size&patternType=literal
Example
Found from source code
So it seems it's only for MySQL and PostgreSQL with different defaults and can be disabled by setting it to 0
It should go there I think for a basic documentation https://www.prisma.io/docs/concepts/database-connectors/postgresql https://www.prisma.io/docs/concepts/database-connectors/mysql
@pimeys can you confirm the above? and if possible give more details about why it's important / why would someone want to increase / decrease / disable it?