HikariCP: connection.getMetaData().getUserName() fires with each JDBC call
See original GitHub issueUsing JDBC instrumentation, a SELECT USER( )
query is sent with each SQL statement, effectively doubling the number of SQL queries sent by the app.
Screenshot from Datadog APM dashboard, after turning on the java agent. The number of requests is equal to the total number of sql queries sent by the app.
Looking into connection metrics, HikariCP is properly reusing connections from its pool, so the caching mechanism in [Prepared]StatementInstrumentation.java should kick in, and there should be only one SELECT USER( )
statement for each new connection created.
Play 2.6.13 (Scala), Slick 3.2.1, HikariCP 2.7.8
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
HikariCP generate too many connection in every request in Java
I am using HikariCP-3.1.0.jar for managing the connection pool. But When I request to my Database, it generates new more connection in every...
Read more >java.sql.DatabaseMetaData.getUserName java code examples
Returns the version number of this JDBC driver. getSchemas. Returns the schema names ordered by TABLE_CATALOG and TABLE_SCHEMA. getImportedKeys. Returns a list ...
Read more >Preventing database connection leaks - Etleap Blog
Today I am going to write about database connection leaks. ... we use JDBC extensively, along with HikariCP to manage our database ...
Read more >HikariConfig (HikariCP 2.4.6 API) - Javadoc.io
This property controls the maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the pool. String ·...
Read more >Beware of slow transaction callbacks in Spring
Hikari failing after 30 seconds may mean that all connections were actually ... We can't simply put jms.send() as the last statement in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reopening. Will close this issue when the fix ships in the 0.11.0 release early next week.
@gary-huang Also interested in a release with this issue resolved. We’ve turned off APM in the meantime.