Skip to content

MySQL Prepared Statement Cache destroyed by unique traceid #284

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

Open
commercebuild-daniel opened this issue Sep 26, 2024 · 0 comments
Open

Comments

@commercebuild-daniel
Copy link

When enabling sqlcommenter, unique trace ids are added to the sql query as a comment. For MySQL this makes each prepared statement unique, and so the query plan cache never gets hit. Worse it causes each client side connection to hold the max (default 250 using hikari connection pool) number of prepared statements, and then on the server, the summed total of all prepared statement caches hits max_prepared_stmt_count and causes queries to fail.

How can we associate GCP Query insights with our request and application logs by trace id without destroying the applications query performance? It seems the much touted integration with GCP Cloud Trace is not possible without hitting this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant