Warning in update or creation stage - java.lang.Exception: Apparent connection leak detected

Usually this is a warning what indicate a possible low database perfomance or a database operation what take a long time until be finished.

Symptons

When installing or updating the application it is showing in the terminal the error:

2019-10-01 12:51:24,618 [HikariPool-1 housekeeper] [] WARN  com.zaxxer.hikari.pool.ProxyLeakTask - Connection leak detection triggered for com.mysql.cj.jdbc.ConnectionImpl@72fa8e17 on thread localhost-startStop-1, stack trace follows
java.lang.Exception: Apparent connection leak detected
	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128)
	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
	at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:33)
	at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:35)
	at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:425)
	at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:361)
	at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:350)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:469)

Cause

Database is taking more time than expected doing an action. Usually it is shown in updating or creation OpenKM stages.

Resolution

Consider check your database perfomance.

  • Stop OpenKM
  • Add a configuration parameter in the openkm.properties file ( 48000 is the default value, we suggest upgrading to upper number )
spring.datasource.hikari.leak-detection-threshold=240000
  •  Start OpenKM

Properties

Properties

Date

2019-10-01

Applies to

  • Core

Keywords

  • 7.1.x_Pro
  • Professional