Database connection issue: Failed to validate connection


  • We are getting some slowness when browsing through DXP and following message is showed in log:
HikariPool-1 - WARN … Failed to validate connection …  Possibly consider using a shorter maxLifetime value.


  • For DXP 7.3, HikariCP is configured as database connection pool.
  • For DXP 7.4 onwards, HikariCP is the only supported database connection pool. Support has ended for other connection pools such as C3P0, DBCP, and Tomcat.


  • That message is related to configuration property
  • (Copied from vendor's documentation):This property controls the maximum lifetime of a connection in the pool. An in-use connection will never be retired, only when it is closed will it then be removed. On a connection-by-connection basis, minor negative attenuation is applied to avoid mass-extinction in the pool. We strongly recommend setting this value, and it should be several seconds shorter than any database or infrastructure imposed connection time limit. A value of 0 indicates no maximum lifetime (infinite lifetime), subject of course to the idleTimeout setting. The minimum allowed value is 30000ms (30 seconds). Default: 1800000 (30 minutes)
  • It should be taken into account however that DXP defines this property as '0'.
  • Thus, it might happen that database closes a connection while the connection remains in the pool, just because the connection exceeded its life time configured in database. When DXP tries to use this connection, it cannot be used because is closed.

Additional Information




0 人中有 0 人觉得有帮助