Summary: | JDBC pool keeps closed connection as available | ||
---|---|---|---|
Product: | Tomcat Modules | Reporter: | Alex Panchenko <alex.panchenko> |
Component: | jdbc-pool | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | NEW --- | ||
Severity: | normal | CC: | alex.panchenko |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Alex Panchenko
2020-01-17 16:53:01 UTC
We have faced this issue in our shop as well with MS SQL Server on version 9.2.x driver for Java 11. Wondering if a configurable option could be added to the code to allow exceptions thrown from clearWarnings() calls to cause the pool to discard connections during return to the pool. Seems like if the underlying DB vendor supports clearWarnings commands that hit the db server ( suspect most do ), that this failing with an Exception should be a decent indicator that the underlying connection is not in good health. (In reply to ToolGuy1 from comment #1) > We have faced this issue in our shop as well with MS SQL Server on version > 9.2.x driver for Java 11. Wondering if a configurable option could be added > to the code to allow exceptions thrown from clearWarnings() calls to cause > the pool to discard connections during return to the pool. Seems like if the > underlying DB vendor supports clearWarnings commands that hit the db server > ( suspect most do ), that this failing with an Exception should be a decent > indicator that the underlying connection is not in good health. SQL WARNINGs are not an indication of a broken connection. In fact, they are specifically an indication of a GOOD connection: the database is in fact communicating. -1 on the suggestion in comment #1, though the original report seems reasonable. to me. |