Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

memory leak  RSS feed

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have web application with following configuration;

Tomcat 8.0.37
Java "1.8.0_25"
Struts 1.1
oracle 11g

The web application [mmmPms] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4a3a56ec])
and a value of type [java.lang.Class] (value [class supLedgerDateWise_1477563207590_674836]) 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.
 
Versha Agarwal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Versha Agarwal wrote:I have web application with following configuration;

Tomcat 8.0.37
Java "1.8.0_25"
Struts 1.1
oracle 11g

The web application [mmmPms] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4a3a56ec])
and a value of type [java.lang.Class] (value [class supLedgerDateWise_1477563207590_674836]) 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.


I already checked it for Connection, resultset, Preparedstatement
 
author
Sheriff
Posts: 23381
128
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the web app have a reference to the ThreadLocal? If so, then yeah, it is likely a memory leak.

However, if not, then that should be okay. The Thread instance only has a weak reference to the thread local, so, if the app no longer has any references, then it will be collected.

Henry
 
Onion rings are vegetable donuts. Taste this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!