Re: Potential socket leak in kafka sync producer

2015-01-30 Thread Jaikiran Pai
Hi Ankit, Would you be able to share the trimmed down application code which reproduces this issue (maybe as a repo on github)? That way, some of us will get more context about the issue and probably be able to try it out ourselves and see what's wrong. On a related note, have you tried this

Re: Potential socket leak in kafka sync producer

2015-01-30 Thread ankit tyagi
Jaikiran, I have already investigated that this is kafka related. I made a small application which is used only for publishing messages to kafka. If I use dynamic thread pool means where number of maxPoolSize is very large comparative to corePoolSize and I publish each batch of messages only aft

Re: Potential socket leak in kafka sync producer

2015-01-30 Thread Jaikiran Pai
Looking at that heap dump, this probably is a database connection/resource leak (298 connections?) than anything to do with Kafka. Have you investigated if there's any DB resource leak in the application and ruled out that part? -Jaikiran On Friday 30 January 2015 01:08 PM, ankit tyagi wrote:

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread ankit tyagi
attaching my producer whole code. Creating kafkaProducer Bean in xml * * ** ** ** *${KAFKA_PRODUCER_BROKER_LIST}* ** ** ** public class KafkaProducer { private static final Logger LOG = LoggerFactory.getLogger(Kafk

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread ankit tyagi
I have shared object histogram after and before gc on gist https://gist.github.com/ankit1987/f4a04a1350fdd609096d On Fri, Jan 30, 2015 at 12:43 PM, Jaikiran Pai wrote: > What kind of a (managed) component is that which has the @PreDestroy? > Looking at the previous snippet you added, it looks li

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread Jaikiran Pai
What kind of a (managed) component is that which has the @PreDestroy? Looking at the previous snippet you added, it looks like you are creating the Producer in some method? If you are going to close the producer in a @PreDestroy of the component, then you should be creating the producer in the

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread ankit tyagi
Hi, I am closing my producer at the time of shutting down my application. @PreDestroy public void stop() { LOG.info("Stopping Kafka Producer for topic: {}", myTopic); if (myProducer != null) { myProducer.close(); } } On Fri, Jan 30, 2015 at 11:22

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread Manikumar Reddy
Hope you are closing the producers. can you share the attachment through gist/patebin On Fri, Jan 30, 2015 at 11:11 AM, ankit tyagi wrote: > Hi Jaikiran, > > I am using ubuntu and was able to reproduce on redhat too. Please find the > more information below. > > > *DISTRIB_ID=Ubuntu* > *DISTRIB_

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread ankit tyagi
Hi Jaikiran, I am using ubuntu and was able to reproduce on redhat too. Please find the more information below. *DISTRIB_ID=Ubuntu* *DISTRIB_RELEASE=12.04* *DISTRIB_CODENAME=precise* *DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"* *java version "1.7.0_72"* This is happening on client side. Output o

Re: Potential socket leak in kafka sync producer

2015-01-29 Thread Jaikiran Pai
Which operating system are you on and what Java version? Depending on the OS, you could get tools (like lsof) to show which file descriptors are being held on to. Is it the client JVM which ends up with these leaks? Also, would it be possible to post a snippet of your application code which

Potential socket leak in kafka sync producer

2015-01-29 Thread ankit tyagi
Hi, Currently we are using sync producer client of 0.8.1 version in our production box . we are getting the following exception while publishing kafka message *[2015-01-29 13:21:45.505][ThreadPoolTaskExecutor-603][WARN][ClientUtils$:89] Fetching topic metadata with correlation id 10808 for topics