You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently encountered an increased number of warnings from hikari, all about failing to validate a connection before borrowing it from the pool. The log line in question is HikariPool-2 - Failed to validate connection org.mariadb.jdbc.Connection@294613b0 ((conn=55230) Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value.
This appears to come from Poolbase.isConnectionDead, which does 2 setNetworkTimeout calls (both before validation to the validationTimeout and afterward to reset the network timeout back to what it was). If the connection was closed due to errors (at least for the mariadb 3.x driver) the setNetworkTimeout call itself results in an SQLException, which is then logged as a warning. The result is a large number (thousands/day) of warnings about the connection being closed from a method that is supposed to determine whether the connection is closed.
This method should not log warnings (maybe info or debug?) when a return value of false is an expected result (e.g. the connection should not be used, evict it).
We recently encountered an increased number of warnings from hikari, all about failing to validate a connection before borrowing it from the pool. The log line in question is
HikariPool-2 - Failed to validate connection org.mariadb.jdbc.Connection@294613b0 ((conn=55230) Connection.setNetworkTimeout cannot be called on a closed connection). Possibly consider using a shorter maxLifetime value
.This appears to come from Poolbase.isConnectionDead, which does 2 setNetworkTimeout calls (both before validation to the validationTimeout and afterward to reset the network timeout back to what it was). If the connection was closed due to errors (at least for the mariadb 3.x driver) the setNetworkTimeout call itself results in an SQLException, which is then logged as a warning. The result is a large number (thousands/day) of warnings about the connection being closed from a method that is supposed to determine whether the connection is closed.
This method should not log warnings (maybe info or debug?) when a return value of
false
is an expected result (e.g. the connection should not be used, evict it).I think there are 2 ways to fix this:
The text was updated successfully, but these errors were encountered: