# Potential leak when ES embedded in Tomcat webapp?

**URL:** https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024
**Category:** Elasticsearch
**Created:** [August 2, 2011, 7:19am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024 "2011-08-02T07:19:39Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [August 2, 2011, 7:19am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/1 "2011-08-02T07:19:39Z")

</div>

Hi,

Using ES 0.17.2 in WAR application.

- Connecting to ES cluster from Tomcat webapp using TransportClient.
- I restarted the cluster and changed its name which caused the  
TransportClient to be disconnected (that is correct and expected)
- From this point I started getting the following log message in  
catalina.out every 5 seconds:

## [2011-08-02 03:08:55,434] WARN417322[elasticsearch[cached]-pool-1-thread-1]

org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)

- [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
the cluster Cluster [_old\_cluster\_name_], ignoring...

- I undeployed the WAR application from Tomcat, but...

- The logging did not stop.

During the undeploy I am getting the following SEVERE message in  
catalina.out:

SEVERE: The web application [/search] created a ThreadLocal with key of type  
[org.elasticsearch.common.inject.InjectorImpl$1] (value  
[org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
type [java.lang.Object[]] (value [[Ljava.lang.Object;@6d0021f]) but failed  
to remove it when the web application was stopped. Threads are going to be  
renewed over time to try and avoid a probable memory leak.  
Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig checkResources

I make sure that I close the Client during undeploy. (I think Tomcat restart  
would help but may be there is something that could be improved in ES  
because the above scenario can be easily recreated)

Regards,  
Lukas

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 2, 2011, 7:56am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/2 "2011-08-02T07:56:41Z")

</div>

Close will close the thread running on the transport client pinging the  
hosts. I just ran a quick test and see that happening... . If you can  
recreate it, it would be great.

On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> Using ES 0.17.2 in WAR application.
> 
> - Connecting to ES cluster from Tomcat webapp using TransportClient.
> - I restarted the cluster and changed its name which caused the  
> TransportClient to be disconnected (that is correct and expected)
> - From this point I started getting the following log message in  
> catalina.out every 5 seconds:
> 
> ## [2011-08-02 03:08:55,434] WARN417322[elasticsearch[cached]-pool-1-thread-1]
> 
> org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)
> 
> - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
> the cluster Cluster [_old\_cluster\_name_], ignoring...
> 
> - I undeployed the WAR application from Tomcat, but...
> 
> - The logging did not stop.
> 
> During the undeploy I am getting the following SEVERE message in  
> catalina.out:
> 
> SEVERE: The web application [/search] created a ThreadLocal with key of  
> type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
> type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but failed  
> to remove it when the web application was stopped. Threads are going to be  
> renewed over time to try and avoid a probable memory leak.  
> Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig  
> checkResources
> 
> I make sure that I close the Client during undeploy. (I think Tomcat  
> restart would help but may be there is something that could be improved in  
> ES because the above scenario can be easily recreated)
> 
> Regards,  
> Lukas

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [August 2, 2011, 8:14am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/3 "2011-08-02T08:14:58Z")

</div>

You mean preparing a small WAR webapp to allow simple demonstration of this  
issue?

On Tue, Aug 2, 2011 at 9:56 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Close will close the thread running on the transport client pinging the  
> hosts. I just ran a quick test and see that happening... . If you can  
> recreate it, it would be great.
> 
> On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> 
> > Hi,
> > 
> > Using ES 0.17.2 in WAR application.
> > 
> > - Connecting to ES cluster from Tomcat webapp using TransportClient.
> > - I restarted the cluster and changed its name which caused the  
> > TransportClient to be disconnected (that is correct and expected)
> > - From this point I started getting the following log message in  
> > catalina.out every 5 seconds:
> > 
> > [2011-08-02 03:08:55,434]  
> > WARN417322[elasticsearch[cached]-pool-1-thread-1] -  
> > org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)
> > 
> > - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
> > the cluster Cluster [_old\_cluster\_name_], ignoring...
> > 
> > - I undeployed the WAR application from Tomcat, but...
> > 
> > - The logging did not stop.
> > 
> > During the undeploy I am getting the following SEVERE message in  
> > catalina.out:
> > 
> > SEVERE: The web application [/search] created a ThreadLocal with key of  
> > type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> > [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
> > type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but  
> > failed to remove it when the web application was stopped. Threads are going  
> > to be renewed over time to try and avoid a probable memory leak.  
> > Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig  
> > checkResources
> > 
> > I make sure that I close the Client during undeploy. (I think Tomcat  
> > restart would help but may be there is something that could be improved in  
> > ES because the above scenario can be easily recreated)
> > 
> > Regards,  
> > Lukas

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 2, 2011, 8:30am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/4 "2011-08-02T08:30:51Z")

</div>

Or even if you can recreate it with a plain Main? If not, and you can  
recreate it with a way, its fine as well.

On Tue, Aug 2, 2011 at 11:14 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> You mean preparing a small WAR webapp to allow simple demonstration of this  
> issue?
> 
> On Tue, Aug 2, 2011 at 9:56 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Close will close the thread running on the transport client pinging the  
> > hosts. I just ran a quick test and see that happening... . If you can  
> > recreate it, it would be great.
> > 
> > On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com)wrote:
> > 
> > > Hi,
> > > 
> > > Using ES 0.17.2 in WAR application.
> > > 
> > > - Connecting to ES cluster from Tomcat webapp using TransportClient.
> > > - I restarted the cluster and changed its name which caused the  
> > > TransportClient to be disconnected (that is correct and expected)
> > > - From this point I started getting the following log message in  
> > > catalina.out every 5 seconds:
> > > 
> > > [2011-08-02 03:08:55,434]  
> > > WARN417322[elasticsearch[cached]-pool-1-thread-1] -  
> > > org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)
> > > 
> > > - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
> > > the cluster Cluster [_old\_cluster\_name_], ignoring...
> > > 
> > > - I undeployed the WAR application from Tomcat, but...
> > > 
> > > - The logging did not stop.
> > > 
> > > During the undeploy I am getting the following SEVERE message in  
> > > catalina.out:
> > > 
> > > SEVERE: The web application [/search] created a ThreadLocal with key of  
> > > type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> > > [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
> > > type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but  
> > > failed to remove it when the web application was stopped. Threads are going  
> > > to be renewed over time to try and avoid a probable memory leak.  
> > > Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig  
> > > checkResources
> > > 
> > > I make sure that I close the Client during undeploy. (I think Tomcat  
> > > restart would help but may be there is something that could be improved in  
> > > ES because the above scenario can be easily recreated)
> > > 
> > > Regards,  
> > > Lukas

---

<div class="post-metadata">

### Author: ![Amit\_Soni](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Amit\_Soni](https://discuss.elastic.co/u/Amit_Soni)
#### Post date: [February 28, 2014, 4:00am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/5 "2014-02-28T04:00:21Z")

</div>

Actually I have been seeing error as well. Unfortunately, it is quite  
intermittent and hence tough to reproduce it.

On Tuesday, August 2, 2011 1:30:51 AM UTC-7, kimchy wrote:

> Or even if you can recreate it with a plain Main? If not, and you can  
> recreate it with a way, its fine as well.
> 
> On Tue, Aug 2, 2011 at 11:14 AM, Lukáš Vlček \<[lukas...@gmail.com](mailto:lukas...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > You mean preparing a small WAR webapp to allow simple demonstration of  
> > this issue?
> > 
> > On Tue, Aug 2, 2011 at 9:56 AM, Shay Banon \<[kim...@gmail.com](mailto:kim...@gmail.com)\<javascript:\>
> > 
> > > wrote:
> > 
> > > Close will close the thread running on the transport client pinging the  
> > > hosts. I just ran a quick test and see that happening... . If you can  
> > > recreate it, it would be great.
> > > 
> > > On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček \<[lukas...@gmail.com](mailto:lukas...@gmail.com)\<javascript:\>
> > > 
> > > > wrote:
> > > 
> > > > Hi,
> > > > 
> > > > Using ES 0.17.2 in WAR application.
> > > > 
> > > > - Connecting to ES cluster from Tomcat webapp using TransportClient.
> > > > - I restarted the cluster and changed its name which caused the  
> > > > TransportClient to be disconnected (that is correct and expected)
> > > > - From this point I started getting the following log message in  
> > > > catalina.out every 5 seconds:
> > > > 
> > > > [2011-08-02 03:08:55,434]  
> > > > WARN417322[elasticsearch[cached]-pool-1-thread-1] -  
> > > > org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)
> > > > 
> > > > - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
> > > > the cluster Cluster [_old\_cluster\_name_], ignoring...
> > > > 
> > > > - I undeployed the WAR application from Tomcat, but...
> > > > 
> > > > - The logging did not stop.
> > > > 
> > > > During the undeploy I am getting the following SEVERE message in  
> > > > catalina.out:
> > > > 
> > > > SEVERE: The web application [/search] created a ThreadLocal with key of  
> > > > type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> > > > [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
> > > > type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but failed  
> > > > to remove it when the web application was stopped. Threads are going to be  
> > > > renewed over time to try and avoid a probable memory leak.  
> > > > Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig  
> > > > checkResources
> > > > 
> > > > I make sure that I close the Client during undeploy. (I think Tomcat  
> > > > restart would help but may be there is something that could be improved in  
> > > > ES because the above scenario can be easily recreated)
> > > > 
> > > > Regards,  
> > > > Lukas

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 28, 2014, 7:19am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/6 "2014-02-28T07:19:56Z")

</div>

Undeploying the webapp is not enough.  
Sadly IIRC due to a very old issue in Guava, all threads are not stopped.  
So you have to restart the container.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 févr. 2014 à 05:00, "amit.soni" [amitsoni29@gmail.com](mailto:amitsoni29@gmail.com) a écrit :

Actually I have been seeing error as well. Unfortunately, it is quite intermittent and hence tough to reproduce it.

> On Tuesday, August 2, 2011 1:30:51 AM UTC-7, kimchy wrote:  
> Or even if you can recreate it with a plain Main? If not, and you can recreate it with a way, its fine as well.
> 
> > On Tue, Aug 2, 2011 at 11:14 AM, Lukáš Vlček [lukas...@gmail.com](mailto:lukas...@gmail.com) wrote:  
> > You mean preparing a small WAR webapp to allow simple demonstration of this issue?
> > 
> > > On Tue, Aug 2, 2011 at 9:56 AM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:  
> > > Close will close the thread running on the transport client pinging the hosts. I just ran a quick test and see that happening... . If you can recreate it, it would be great.
> > > 
> > > > On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček [lukas...@gmail.com](mailto:lukas...@gmail.com) wrote:  
> > > > Hi,
> > > > 
> > > > Using ES 0.17.2 in WAR application.
> > > > 
> > > > - Connecting to ES cluster from Tomcat webapp using TransportClient.
> > > > - I restarted the cluster and changed its name which caused the TransportClient to be disconnected (that is correct and expected)
> > > > - From this point I started getting the following log message in catalina.out every 5 seconds:
> > > > 
> > > > [2011-08-02 03:08:55,434] WARN417322[elasticsearch[cached]-pool-1-thread-1] - org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86) - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of the cluster Cluster [_old\_cluster\_name_], ignoring...
> > > > 
> > > > - I undeployed the WAR application from Tomcat, but...
> > > > - The logging did not stop.
> > > > 
> > > > During the undeploy I am getting the following SEVERE message in catalina.out:
> > > > 
> > > > SEVERE: The web application [/search] created a ThreadLocal with key of type [org.elasticsearch.common.inject.InjectorImpl$1] (value [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.  
> > > > Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig checkResources
> > > > 
> > > > I make sure that I close the Client during undeploy. (I think Tomcat restart would help but may be there is something that could be improved in ES because the above scenario can be easily recreated)
> > > > 
> > > > Regards,  
> > > > Lukas

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/76D3CD93-3445-4B5D-BEDB-3DD713548543%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/76D3CD93-3445-4B5D-BEDB-3DD713548543%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Doru\_Sular](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@Doru\_Sular](https://discuss.elastic.co/u/Doru_Sular)
#### Post date: [April 14, 2014, 4:25pm UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/7 "2014-04-14T16:25:03Z")

</div>

Hi David,

I receive the same message from tomcat with elasticsearch 1.1.0:

SEVERE: The web application [/test-es] created a ThreadLocal with key of

> type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> [org.elasticsearch.common.inject.InjectorImpl$1@619aaf5]) and a value of  
> type [java.lang.Object] (value [[Ljava.lang.Object;@7f26bdf3]) but failed  
> to remove it when the web application was stopped. Threads are going to be  
> renewed over time to try and avoid a probable memory leak.

This cause my web application to fail to redeploy. Restarting tomcat is not  
a solution, since in production we will need to have many web applications.  
There is no solution for this at all?  
Thank you very much,  
Doru

On Friday, February 28, 2014 8:19:56 AM UTC+1, David Pilato wrote:

> Undeploying the webapp is not enough.  
> Sadly IIRC due to a very old issue in Guava, all threads are not stopped.  
> So you have to restart the container.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 28 févr. 2014 à 05:00, "amit.soni" \<[amits...@gmail.com](mailto:amits...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Actually I have been seeing error as well. Unfortunately, it is quite  
> intermittent and hence tough to reproduce it.
> 
> On Tuesday, August 2, 2011 1:30:51 AM UTC-7, kimchy wrote:
> 
> > Or even if you can recreate it with a plain Main? If not, and you can  
> > recreate it with a way, its fine as well.
> > 
> > On Tue, Aug 2, 2011 at 11:14 AM, Lukáš Vlček [lukas...@gmail.com](mailto:lukas...@gmail.com) wrote:
> > 
> > > You mean preparing a small WAR webapp to allow simple demonstration of  
> > > this issue?
> > > 
> > > On Tue, Aug 2, 2011 at 9:56 AM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > > 
> > > > Close will close the thread running on the transport client pinging the  
> > > > hosts. I just ran a quick test and see that happening... . If you can  
> > > > recreate it, it would be great.
> > > > 
> > > > On Tue, Aug 2, 2011 at 10:19 AM, Lukáš Vlček [lukas...@gmail.com](mailto:lukas...@gmail.com)wrote:
> > > > 
> > > > > Hi,
> > > > > 
> > > > > Using ES 0.17.2 in WAR application.
> > > > > 
> > > > > - Connecting to ES cluster from Tomcat webapp using TransportClient.
> > > > > - I restarted the cluster and changed its name which caused the  
> > > > > TransportClient to be disconnected (that is correct and expected)
> > > > > - From this point I started getting the following log message in  
> > > > > catalina.out every 5 seconds:
> > > > > 
> > > > > [2011-08-02 03:08:55,434]  
> > > > > WARN417322[elasticsearch[cached]-pool-1-thread-1] -  
> > > > > org.elasticsearch.common.logging.slf4j.Slf4jESLogger.internalWarn(Slf4jESLogger.java:86)
> > > > > 
> > > > > - [Angel Salvadore] Node [#transport#-1][inet[/x.x.x.x:9300]] not part of  
> > > > > the cluster Cluster [_old\_cluster\_name_], ignoring...
> > > > > 
> > > > > - I undeployed the WAR application from Tomcat, but...
> > > > > 
> > > > > - The logging did not stop.
> > > > > 
> > > > > During the undeploy I am getting the following SEVERE message in  
> > > > > catalina.out:
> > > > > 
> > > > > SEVERE: The web application [/search] created a ThreadLocal with key  
> > > > > of type [org.elasticsearch.common.inject.InjectorImpl$1] (value  
> > > > > [org.elasticsearch.common.inject.InjectorImpl$1@6e29991]) and a value of  
> > > > > type [java.lang.Object] (value [[Ljava.lang.Object;@6d0021f]) but failed  
> > > > > to remove it when the web application was stopped. Threads are going to be  
> > > > > renewed over time to try and avoid a probable memory leak.  
> > > > > Aug 2, 2011 2:58:08 AM org.apache.catalina.startup.HostConfig  
> > > > > checkResources
> > > > > 
> > > > > I make sure that I close the Client during undeploy. (I think Tomcat  
> > > > > restart would help but may be there is something that could be improved in  
> > > > > ES because the above scenario can be easily recreated)
> > > > > 
> > > > > Regards,  
> > > > > Lukas
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4ed58ebc-40b8-42cd-8d64-fc69d86a8e98%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/789879b5-994b-4439-8e82-5d3c176df558%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/789879b5-994b-4439-8e82-5d3c176df558%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:35am UTC](https://discuss.elastic.co/t/potential-leak-when-es-embedded-in-tomcat-webapp/5024/8 "2017-07-06T01:35:56Z")

</div>


