[ https://issues.apache.org/jira/browse/KAFKA-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14198787#comment-14198787 ]
Ewen Cheslack-Postava commented on KAFKA-1745: ---------------------------------------------- [~junrao] I think he was saying he has a fixed set of producers which are shared among a variable number of threads. He never calls producer.close(), but expects that if he has a pool of, e.g., 5 producers, that the number of KQUEUEs and PIPEs is constant, which makes sense. However, I tried reproducing this and couldn't. My simple test just allocated one producer and spun up threads, each of which sent a message via that producer. lsof showed the KQUEUEs and PIPEs remaining constant. This is exactly what I'd expect since these should only be allocated on the producer's networking thread. Vishal, is there any chance you're leaking producers from the pool by accident? Can you generate a small test case that reproduces the issue? > Each new thread creates a PIPE and KQUEUE as open files during > producer.send() and does not get cleared when the thread that creates them is > cleared. > ----------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-1745 > URL: https://issues.apache.org/jira/browse/KAFKA-1745 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8.1.1 > Environment: Mac OS Mavericks > Reporter: Vishal > Priority: Critical > > Hi, > I'm using the java client API for Kafka. I wanted to send data to Kafka > by using a producer pool as I'm using a sync producer. The thread that sends > the data is from the thread pool that grows and shrinks depending on the > usage. So, when I try to send data from one thread, 1 KQUEUE and 2 PIPES are > created (got this info by using lsof). If I keep using the same thread it's > fine but when a new thread sends data to Kafka (using producer.send() ) a new > KQUEUE and 2 PIPEs are created. > This is okay, but when the thread is cleared from the thread pool and a new > thread is created, then new KQUEUEs and PIPEs are created. The problem is > that the old ones which were created are not getting destroyed and they are > showing up as open files. This is causing a major problem as the number of > open file keep increasing and does not decrease. > Please suggest any solutions. > FYI, the number of TCP connections established from the producer system to > the Kafka Broker remain constant throughout. -- This message was sent by Atlassian JIRA (v6.3.4#6332)