[jira] [Commented] (KAFKA-1521) Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x)
[ https://issues.apache.org/jira/browse/KAFKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15749639#comment-15749639 ] Anish Khanzode commented on KAFKA-1521: --- This is really a problem when kafka consumer is used in a embedded environment. I would love to have API that can let me pass pluggable metrics system or ignore if dont care. Does new API also suffer from same issue? > Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x) > - > > Key: KAFKA-1521 > URL: https://issues.apache.org/jira/browse/KAFKA-1521 > Project: Kafka > Issue Type: Bug > Components: producer >Affects Versions: 0.8.0, 0.8.1.1 > Environment: Tomcat Container or Any other J2EE container >Reporter: Bhavesh Mistry >Assignee: Jun Rao >Priority: Minor > > Hi Kafka Team, > We are running multiple webapps in tomcat container, and we have producer > which are managed by the ServletContextListener (Lifecycle). Upon > contextInitialized we create and on contextDestroyed we call the > producer.close() but underlying Metric Lib does not shutdown. So we have > thread leak due to this issue. I had to call > Metrics.defaultRegistry().shutdown() to resolve this issue. is this know > issue ? I know the metric lib have JVM Shutdown hook, but it will not be > invoke since the contain thread is un-deploying the web app and class loader > goes way and leaking thread does not find the under lying Kafka class. > Because of this tomcat, it not shutting down gracefully. > Are you guys planing to un-register metrics when Producer close is called or > shutdown Metrics pool for client.id ? > Here is logs: > SEVERE: The web application [ ] appears to have started a thread named > [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely > to create a memory leak. > SEVERE: The web application [] appears to have started a thread named > [metrics-meter-tick-thread-2] but has failed to stop it. This is very likely > to create a memory leak. > Thanks, > Bhavesh -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-1521) Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x)
[ https://issues.apache.org/jira/browse/KAFKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14093367#comment-14093367 ] Bravesh Mistry commented on KAFKA-1521: --- [~nehanarkhede] and [~junrao] This issue is related to KAFKA-1567. I understand the on Close of producer you can not close the Metric thread pool but on close of the Producer, producer related metric should be de-registered. Thanks, Bhavesh Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x) - Key: KAFKA-1521 URL: https://issues.apache.org/jira/browse/KAFKA-1521 Project: Kafka Issue Type: Bug Components: producer Affects Versions: 0.8.0, 0.8.1.1 Environment: Tomcat Container or Any other J2EE container Reporter: Bravesh Mistry Assignee: Jun Rao Priority: Minor Hi Kafka Team, We are running multiple webapps in tomcat container, and we have producer which are managed by the ServletContextListener (Lifecycle). Upon contextInitialized we create and on contextDestroyed we call the producer.close() but underlying Metric Lib does not shutdown. So we have thread leak due to this issue. I had to call Metrics.defaultRegistry().shutdown() to resolve this issue. is this know issue ? I know the metric lib have JVM Shutdown hook, but it will not be invoke since the contain thread is un-deploying the web app and class loader goes way and leaking thread does not find the under lying Kafka class. Because of this tomcat, it not shutting down gracefully. Are you guys planing to un-register metrics when Producer close is called or shutdown Metrics pool for client.id ? Here is logs: SEVERE: The web application [ ] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a memory leak. SEVERE: The web application [] appears to have started a thread named [metrics-meter-tick-thread-2] but has failed to stop it. This is very likely to create a memory leak. Thanks, Bhavesh -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (KAFKA-1521) Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x)
[ https://issues.apache.org/jira/browse/KAFKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14053139#comment-14053139 ] Jun Rao commented on KAFKA-1521: In general, we probably can't just shutdown Metrics on producer close. There could be other producers/consumers or other usage of Metrics in the same jvm. Those metrics-meter-tick threads seem to be created globally, not per producer instance. So, they should be terminated when the jvm exits. Metrics does register a shutdown hook to achieve that. If your container somehow overrides those shutdown hooks, you can explicitly call the metrics shutdown hook on jvm exit. Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x) - Key: KAFKA-1521 URL: https://issues.apache.org/jira/browse/KAFKA-1521 Project: Kafka Issue Type: Bug Components: producer Affects Versions: 0.8.0, 0.8.1.1 Environment: Tomcat Container or Any other J2EE container Reporter: Bravesh Mistry Assignee: Jun Rao Priority: Minor Hi Kafka Team, We are running multiple webapps in tomcat container, and we have producer which are managed by the ServletContextListener (Lifecycle). Upon contextInitialized we create and on contextDestroyed we call the producer.close() but underlying Metric Lib does not shutdown. So we have thread leak due to this issue. I had to call Metrics.defaultRegistry().shutdown() to resolve this issue. is this know issue ? I know the metric lib have JVM Shutdown hook, but it will not be invoke since the contain thread is un-deploying the web app and class loader goes way and leaking thread does not find the under lying Kafka class. Because of this tomcat, it not shutting down gracefully. Are you guys planing to un-register metrics when Producer close is called or shutdown Metrics pool for client.id ? Here is logs: SEVERE: The web application [ ] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a memory leak. SEVERE: The web application [] appears to have started a thread named [metrics-meter-tick-thread-2] but has failed to stop it. This is very likely to create a memory leak. Thanks, Bhavesh -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (KAFKA-1521) Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x)
[ https://issues.apache.org/jira/browse/KAFKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14052056#comment-14052056 ] Bravesh Mistry commented on KAFKA-1521: --- Here is confirmation from [~guozhang] : Guozhang Wang wangg...@gmail.com Thu, Jul 3, 2014 at 3:47 PM To: Bhavesh Mistry mistry.p.bhav...@gmail.com This is indeed an issue. Could you file a jira? On Thu, Jul 3, 2014 at 3:43 PM, Bhavesh Mistry mistry.p.bhav...@gmail.com wrote: Hi Guozhang, Is this expected ? Should I file an issue ? Or if this is know issue. Thanks, Bhavesh On Thu, Jul 3, 2014 at 11:40 AM, Bhavesh Mistry mistry.p.bhav...@gmail.com wrote: Hi Guozhang, Thank you for your quick response. This is version 0.8.0 producer package kafka.javaapi.producer.Producer. Thanks, Bhavesh On Thu, Jul 3, 2014 at 11:04 AM, Guozhang Wang wangg...@gmail.com wrote: Hi Bhavesh, Is this the new producer under clients or the original producer under core? Guozhang Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x) - Key: KAFKA-1521 URL: https://issues.apache.org/jira/browse/KAFKA-1521 Project: Kafka Issue Type: Bug Components: producer Affects Versions: 0.8.0, 0.8.1.1 Environment: Tomcat Container or Any other J2EE container Reporter: Bravesh Mistry Assignee: Jun Rao Priority: Minor Hi Kafka Team, We are running multiple webapps in tomcat container, and we have producer which are managed by the ServletContextListener (Lifecycle). Upon contextInitialized we create and on contextDestroyed we call the producer.close() but underlying Metric Lib does not shutdown. So we have thread leak due to this issue. I had to call Metrics.defaultRegistry().shutdown() to resolve this issue. is this know issue ? I know the metric lib have JVM Shutdown hook, but it will not be invoke since the contain thread is un-deploying the web app and class loader goes way and leaking thread does not find the under lying Kafka class. Because of this tomcat, it not shutting down gracefully. Are you guys planing to un-register metrics when Producer close is called or shutdown Metrics pool for client.id ? Here is logs: SEVERE: The web application [ ] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a memory leak. SEVERE: The web application [] appears to have started a thread named [metrics-meter-tick-thread-2] but has failed to stop it. This is very likely to create a memory leak. Thanks, Bhavesh -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (KAFKA-1521) Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x)
[ https://issues.apache.org/jira/browse/KAFKA-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14052062#comment-14052062 ] Bravesh Mistry commented on KAFKA-1521: --- Just for information, I am using Async mode of Kafka Producers. Producer Graceful Shutdown issue in Container (Kafka version 0.8.x.x) - Key: KAFKA-1521 URL: https://issues.apache.org/jira/browse/KAFKA-1521 Project: Kafka Issue Type: Bug Components: producer Affects Versions: 0.8.0, 0.8.1.1 Environment: Tomcat Container or Any other J2EE container Reporter: Bravesh Mistry Assignee: Jun Rao Priority: Minor Hi Kafka Team, We are running multiple webapps in tomcat container, and we have producer which are managed by the ServletContextListener (Lifecycle). Upon contextInitialized we create and on contextDestroyed we call the producer.close() but underlying Metric Lib does not shutdown. So we have thread leak due to this issue. I had to call Metrics.defaultRegistry().shutdown() to resolve this issue. is this know issue ? I know the metric lib have JVM Shutdown hook, but it will not be invoke since the contain thread is un-deploying the web app and class loader goes way and leaking thread does not find the under lying Kafka class. Because of this tomcat, it not shutting down gracefully. Are you guys planing to un-register metrics when Producer close is called or shutdown Metrics pool for client.id ? Here is logs: SEVERE: The web application [ ] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a memory leak. SEVERE: The web application [] appears to have started a thread named [metrics-meter-tick-thread-2] but has failed to stop it. This is very likely to create a memory leak. Thanks, Bhavesh -- This message was sent by Atlassian JIRA (v6.2#6252)