<div class="gmail_quote">On Thu, Apr 19, 2012 at 11:33 AM, Martijn Pieters <span dir="ltr">&lt;<a href="mailto:mj@zopatista.com">mj@zopatista.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Apr 19, 2012 at 17:20, Claudiu Saftoiu &lt;<a href="mailto:csaftoiu@gmail.com">csaftoiu@gmail.com</a>&gt; wrote:<br>
&gt; My question is: what could possibly be causing the server to &#39;lock up&#39;, even<br>
&gt; on a<br>
&gt; simple view like &#39;is_alive&#39;, without using any memory or CPU? Is there some<br>
&gt; ZODB<br>
&gt; resource that might be getting gradually exhausted because I&#39;m not handling<br>
&gt; it properly?<br>
<br>
</div>I don&#39;t know, anything could lock up your site if something is waiting<br>
for a lock, for example.<br></blockquote><div><br></div><div>Are there locks that could possibly be used for the &#39;is_alive&#39; function? Here is the</div><div>definition in its entirety.</div><div><br></div><div>In &#39;configure.zcml&#39;: </div>
<div><div>  &lt;view</div><div>    view=&quot;.views.is_alive&quot;</div><div>    name=&quot;is_alive&quot;</div><div>    renderer=&quot;json&quot;</div><div>    /&gt;</div></div><div>in &#39;views.py&#39;: </div><div><div>
    def is_alive(request):</div><div>        return True</div></div><div><br></div><div>Whatever the problem is, it causes &#39;is_alive&#39; to take forever, and the CPU is not</div><div>spinning at 100%, and memory usage is not high. Could this be a lock problem?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Use <a href="http://pypi.python.org/pypi/z3c.deadlockdebugger" target="_blank">http://pypi.python.org/pypi/z3c.deadlockdebugger</a> to figure out<br>

what the threads are doing at this time. Preferably, trigger the<br>
dump_threads() method of that module on SIGUSR1, like the Zope<br>
signalstack product does (see<br>
<a href="http://svn.plone.org/svn/collective/Products.signalstack/trunk/Products/signalstack/__init__.py" target="_blank">http://svn.plone.org/svn/collective/Products.signalstack/trunk/Products/signalstack/__init__.py</a><br>

for the exact code to bind the signal handler). That&#39;ll tell you<br>
exactly what each thread is busy with when you send the signal.<br></blockquote><div><br></div><div>Thanks, I&#39;ll check this out.</div><div>- Claudiu</div></div>