title: Analyzing thread dump of a java process
body: <p>I have Java EE based application running on tomcat and I am seeing that all of a sudden the application hangs after running for couple of hours.</p>
  
  <p>I collected the thread dump from the application just before it hangs and put it in TDA for analysis:</p>
  
  <p><img src="https://i.stack.imgur.com/oQFxh.png" alt="enter image description here"></p>
  
  <p><a href="https://java.net/projects/tda" rel="noreferrer">TDA</a> (Thread Dump Analyzer) gives the following message for the above monitor:</p>
  
  <pre><code>A lot of threads are waiting for this monitor to become available again.
  This might indicate a congestion. You also should analyze other locks 
  blocked by threads waiting for this monitor as there might be much more 
  threads waiting for it.
  </code></pre>
  
  <p>And here is the stacktrace of the thread highlighted above:</p>
  
  <pre><code>"MY_THREAD" prio=10 tid=0x00007f97f1918800 nid=0x776a 
               waiting for monitor entry [0x00007f9819560000]
     java.lang.Thread.State: BLOCKED (on object monitor)
      at java.util.Hashtable.get(Hashtable.java:356)
      - locked &lt;0x0000000680038b68&gt; (a java.util.Properties)
      at java.util.Properties.getProperty(Properties.java:951)
      at java.lang.System.getProperty(System.java:709)
      at com.MyClass.myMethod(MyClass.java:344)
  </code></pre>
  
  <p>I want to know what does the <code>"waiting for monitor entry"</code> state means? And also would appreciate any pointers to help me debug this issue.</p>