Skip to content

DB connection leaks #35119

@wezell

Description

@wezell

Problem Statement

We are seeing some new leaking connections on startup which might be causing db deadlocks or other issues. Here is one example report:

java.lang.Exception: Apparent connection leak detected
	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
	at com.dotmarketing.db.DbConnectionFactory.getConnection(DbConnectionFactory.java:253)
	at com.dotmarketing.common.db.DotConnect.executeQuery(DotConnect.java:625)
	at com.dotmarketing.common.db.DotConnect.loadResult(DotConnect.java:334)
	at com.dotmarketing.common.db.DotConnect.loadResults(DotConnect.java:456)
	at com.dotmarketing.servlets.UpdateQuartzCronJobsServlet.init(UpdateQuartzCronJobsServlet.java:48)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:986)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:943)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:840)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4222)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4523)

Steps to Reproduce

Start dotCMS , tail the logs

Acceptance Criteria

  • No more db leaks

dotCMS Version

26.03.20

Severity

Medium - Some functionality impacted

Links

https://dotcms.slack.com/archives/C096E0QAM7G/p1774457832731549

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions