Warning in the logs about cleaning up leaked connection after upgrade from 1.3.6 to 1.3.8
947 views
Skip to first unread message
Guillaume Smet
unread,
Apr 28, 2014, 12:40:36 PM4/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hika...@googlegroups.com
Hi,
After upgrading to Hikari 1.3.8, I have a lot of the following warnings in my logs: [2014-04-28 18:35:37,107] WARN - ThreadedHousekeeper - - cleaning up leaked connection at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:63) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:69) at com.zaxxer.hikari.HikariPool.addConnection(HikariPool.java:339) at com.zaxxer.hikari.HikariPool.access$300(HikariPool.java:52) at com.zaxxer.hikari.HikariPool$1AddConnection.run(HikariPool.java:251) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
Note that I'm using Spring and Hibernate to deal with the connections. I'm not doing anything fancy.
Is this expected? I didn't have this issue with 1.3.6.
-- Guillaume
Brett Wooldridge
unread,
Apr 28, 2014, 11:55:44 PM4/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hika...@googlegroups.com
ThreadedHousekeeper is a class from (I think) the pgjdbc-ng driver. Is it possible that you've updated the PostgreSQL driver? I've told the developers over at pgjdbc-ng before that enabling their leak detection by default is likely to cause issues for connection pools. Their leak detection triggers when a connection is created but is not closed for a long time. However, with a connection pool this is exactly what one expects to happen; the connection is created and resides in the pool without being closed for possibly hours or days.
The changes between HikariCP 1.3.6 and 1.3.8 include only:
It is possible that the isConnectionAlive() method was (in 1.3.6) erroneously causing connections to close early, and therefore avoiding the pgjdbc-ng leak detection. And the fix to isConnectionAlive() is allowing connections to live longer, and triggering the pgjdbc-ng leak detection. However, the 1.3.7/1.3.8 behavior is correct, so I would investigate how to disable the leak detection or ThreadedHousekeeper pgjdbc-ng. You might also consider opening a bug against pgjdbc-ng stating that their "leak" detection is causing spurious warnings for connection pools.
Guillaume Smet
unread,
Apr 29, 2014, 4:05:36 AM4/29/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hika...@googlegroups.com
Hi Brett,
Indeed, using housekeeper.enabled=false did the trick.
I'll wait to see if the driver development is still alive before opening a new bug. I already have a couple of pull requests waiting for attention there.
Thanks for your feedback.
-- Guillaume
Brett Wooldridge
unread,
May 5, 2014, 11:36:29 AM5/5/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hika...@googlegroups.com
I've joined as a committer on the pgjdbc-ng project, so hopefully with 3 committers on-board it can move along a little more quickly.