Potential memory leak in java driver

Bhuvan Rawal <[email protected]> Tue, 29 Aug 2017 14:57:27 +0530
Newsgroups gmane.comp.db.mysql.java
Message-ID <CADQ6LYnsxq6rqQoFGfP5eSNMqCTTtvxS3HROLRpf_7kX45zwGQ@mail.gmail.com>
--001a113eebc618e9720557e10502
Content-Type: text/plain; charset="UTF-8"

Hi,

I was debugging a OOM isssue with our application server using MySQL
community driver version *5.1.41*, 1G heap which was running for approx 5
days. When heap dump was analyzed it was found that almost all the space
was consumed by mysql NonRegisteringDriver class and specifically a field
named connectionPhantomRefs.

We are using maxLifeTime of 7 Mins (Default is 30 mins), and min
connections at anypoint is 40 on single server instance. My guess is since
we are killing connection every 7 minutes so 24*60*60/7 = 12342 connections
per day. If the the connection are stored in the phantom reference map then
this could possibly cause the issue over a long period of time.

Please let me know if I can provide further information.

Best Regards,
Bhuvan Rawal

--001a113eebc618e9720557e10502--