# Elastic-apm-agent jdbcHelper seems to use a lot of memory

**URL:** <https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295>\
**Category:** APM\
**Tags:** java\
**Created:** [August 15, 2019, 4:21am UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295 "2019-08-15T04:21:43Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Paul\_Harris1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_harris1/32/52341_2.png) [@Paul\_Harris1](https://discuss.elastic.co/u/Paul_Harris1)\
**Post date:** [August 21, 2019, 9:07pm UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/21 "2019-08-21T21:07:48Z")

</div>

With your latest snapshot i can confirm that the SEVERE message no longer appears for those threads when the undeploy happens 🙂 (for this thread heh)

```auto
catalina.out:SEVERE: The web application [/v4##k000346] appears to have started a thread named [pool-11-thread-1] but has failed to stop it. This is very likely to create a memory leak.
catalina.out:SEVERE: The web application [/v4##k000346] appears to have started a thread named [I/O dispatcher 1] but has failed to stop it. This is very likely to create a memory leak.
catalina.out:SEVERE: The web application [/v4##k000346] appears to have started a thread named [I/O dispatcher 2] but has failed to stop it. This is very likely to create a memory leak.

```

these are the only ones now appearing, which doesnt include yours! Yay!

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [August 22, 2019, 6:30am UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/22 "2019-08-22T06:30:09Z")

</div>

@Paul_Harris1 thanks for your extremely valuable input! You really made it easy for us to pinpoint and fix!

Just to verify- you get the `SEVERE` logging for `pool-11-thread-1` (a basic Java Executors thread?) and `I/O dispatcher 1/2` (Apache HTTP client threads?) when not using an agent as well?

---

<div class="post-metadata">

**Author:** ![Paul\_Harris1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_harris1/32/52341_2.png) [@Paul\_Harris1](https://discuss.elastic.co/u/Paul_Harris1)\
**Post date:** [August 22, 2019, 9:49pm UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/23 "2019-08-22T21:49:07Z")

</div>

That's actually a fair question, my assumption was they were unrelated, but I hadn't verified that.

I removed the agent etc, and I can confirm those messages are still present without the elastic-apm agent.

Ultimately I think i'll start moving away from hot deploys!

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [August 25, 2019, 4:44am UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/24 "2019-08-25T04:44:48Z")

</div>

Thanks a lot for confirming!!  
These threads may actually demonstrate how Tomcat's memory-leak-prevention mechanism _does_ serve it purpose on hot deploys 🙂  
Note that [1.9.0 version of our agent](https://github.com/elastic/apm-agent-java/releases/tag/v1.9.0) was released with this fix included.  
Again, thanks for your insightful inputs!

---

<div class="post-metadata">

**Author:** ![Paul\_Harris1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_harris1/32/52341_2.png) [@Paul\_Harris1](https://discuss.elastic.co/u/Paul_Harris1)\
**Post date:** [August 25, 2019, 11:57pm UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/25 "2019-08-25T23:57:12Z")

</div>

awesome 🙂 It all got shipped to the application servers as soon as i saw the release notification 🙂

---

<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:** [September 15, 2019, 7:57pm UTC](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295/26 "2019-09-15T19:57:13Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

[Previous page](https://discuss.elastic.co/t/elastic-apm-agent-jdbchelper-seems-to-use-a-lot-of-memory/195295.md?page=1)
