I have verified that in version 8.0.36 of tomcat jdbc the validation query functionality does not commit the transaction it starts in order to run the validation query, which can cause an open transaction for a very long time (possibly until the database crashes). This seems to be especially problematic if you have a large pool where the connections are idle for a large period of time.
I also tested against version 9.0.0M9, and in that version the problem is fixed. However, nothing about this appears in the release notes for any version (9.0, 8.5, or 8.0). If this bug has indeed been fixed it should be documented in the release notes. Also, back-porting the fix to the 8.0 branch would be very helpful. For the time being I am working around the problem by changing my validation query from "SELECT 1" to be "SELECT 1; COMMIT" (using postgresql). This prevents the issue. This was reported previously (three years ago) here: https://mail-archives.apache.org/mod_mbox/tomcat-users/201301.mbox/%3CCAPw873vy%2B9kWMQiFPbnTX6g1FSQ8oTVhDJ3Zagp9UkUZ3d5qjw%40mail.gmail.com%3E Thanks, John