[ https://issues.apache.org/jira/browse/NIFI-5501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16895026#comment-16895026 ]
Przemyslaw Dubaniewicz commented on NIFI-5501: ---------------------------------------------- I had the same problem with newer JDBC driver from Oracle: {code:java} "mysql-cj-abandoned-connection-cleanup" #124 daemon prio=5 os_prio=0 tid=0x00007f7108085000 nid=0x46b in Object.wait() [0x00007f70d2262000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144) - locked <0x00000005c4c05c40> (a java.lang.ref.ReferenceQueue$Lock) at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:85) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) {code} It seems the problem is caused by this old MySQL JDBC bug, which is still not fixed. I switched to MariaDB JDBC driver and I have no more threads leaking. > MySQL connection cleanup thread leak > ------------------------------------ > > Key: NIFI-5501 > URL: https://issues.apache.org/jira/browse/NIFI-5501 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Affects Versions: 1.7.1 > Environment: - Ubuntu 18.04 LTS > - mysql-connector-java-5.1.46 > - Java 1.8.0_171 > Reporter: Tanapol Nearunchorn > Priority: Major > Attachments: nifi-threaddump.txt > > > There are thousands of "Abandoned connection cleanup thread" left running > that cause memory leak in NiFi. > I got a thread dump example here (full thread dump also attached): > {code:java} > "Abandoned connection cleanup thread" #18371 daemon prio=5 os_prio=0 > tid=0x00007f3b840e7800 nid=0x76a3 in Object.wait() [0x00007f3b24ebb000] > java.lang.Thread.State: TIMED_WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143) > - locked <0x0000000348a12628> (a java.lang.ref.ReferenceQueue$Lock) > at > com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > Locked ownable synchronizers: > - <0x0000000348a12648> (a java.util.concurrent.ThreadPoolExecutor$Worker) > {code} > I'm not sure where these threads come from which component because in my > flow, I used CaptureChangeMySQL processor and DBCPConnectionPool controller > service. > As I also found related problem here: [mysql Bug > #69526|https://bugs.mysql.com/bug.php?id=69526] but it quite a bit old. -- This message was sent by Atlassian JIRA (v7.6.14#76016)