-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statement leaks #158
Comments
This fixes the case where we disable the cache, but still use statements: The other leak I haven't yet found. |
The user reports how these problems started after our January 5th release. I can read from our commits some changes after that how we use mysql_async:
I'm sorry this is a bit hard to reproduce... |
Ok, reopening this if there's a bug in the mysql_async LRU. I'm definitely just utilizing the LRU we use for tokio_postgres, so that's a good way for me to deal with this now. |
Hi. For some reason we haven't been getting this error until now, when user reported crashes due to reaching
max_prepared_stmt_count
. We typically set the LRU to 1000 statements for everybody, and up until now, nobody except one user have been able to trigger the bug.I'm able to get the same error, but only when disabling the cache completely:
This code will increment the
Prepared_stmt_count
inshow global status like '%stmt%';
very fast, and eventually crash the program when reaching the limit. If setting the statement cache size to1
, the bug doesn't happen.But. There is a very probable chance that even when enabling the cache, we still leak statements in certain scenarios. In our user's case, the value is
1000
and there are probably thousands of different statements, we again reach the maximum and crash. I cannot reproduce the second case.Here's more information in a separate issue: prisma/prisma#6872
The text was updated successfully, but these errors were encountered: