<div dir="ltr"><p>I have one problem with performance in production because of, as I think, blocked threads .</p>
<p>When I got thread dumps from production environment I was surprised that about 50% of thread are in status:</p>
<p><strong>-- Blocked trying to get lock: ch/qos/logback/classic/sift/SiftingAppender@0x1111fe3e8[unlocked]</strong></p>
<p>At the same time, as you can see, SiftingAppender is 'unlocked'.</p>
<p>I have no idea why it's happened.</p>
<p>If we deep into logback sources we will find there a synchronized method which is the 'thin' place I think:</p><pre><code><span>ch</span><span>.</span><span>qos</span><span>.</span><span>logback</span><span>.</span><span>core</span><span>.</span><span>AppenderBase</span><span>.</span><span>doAppend</span><span>(</span><span>E</span><span>)</span><span>
</span><span>public</span><span> </span><span>synchronized</span><span> </span><span>void</span><span> doAppend</span><span>(</span><span>E eventObject</span><span>)</span><span> </span><span>{</span><span>
</span><span>// WARNING: The guard check MUST be the first statement in the</span><span>
</span><span>// doAppend() method.</span><span>
</span><span>// prevent re-entry.</span><span>
</span><span>if</span><span> </span><span>(</span><span>guard</span><span>)</span><span> </span><span>{</span><span>
</span><span>return</span><span>;</span><span>
</span><span>}</span><span>
...</span><span></span><span>
</span><span> </span><span>}<br><br></span></code></pre><p>We use weblogic v.10.3.5.0</p><p>
slf4j.version - 1.7.5</p><p>
logback.version - 1.0.13</p>
<p>Has anybody ideas why it's happened and how to avoid this problem?</p>
It may be not logback's problem. I now trying to find resolution only.</div>