<div class="gmail_quote">On Thu, Apr 19, 2012 at 11:33 AM, Martijn Pieters <span dir="ltr"><<a href="mailto:mj@zopatista.com">mj@zopatista.com</a>></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 <<a href="mailto:csaftoiu@gmail.com">csaftoiu@gmail.com</a>> wrote:<br>
> My question is: what could possibly be causing the server to 'lock up', even<br>
> on a<br>
> simple view like 'is_alive', without using any memory or CPU? Is there some<br>
> ZODB<br>
> resource that might be getting gradually exhausted because I'm not handling<br>
> it properly?<br>
<br>
</div>I don'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 'is_alive' function? Here is the</div><div>definition in its entirety.</div><div><br></div><div>In 'configure.zcml': </div>
<div><div> <view</div><div> view=".views.is_alive"</div><div> name="is_alive"</div><div> renderer="json"</div><div> /></div></div><div>in 'views.py': </div><div><div>
def is_alive(request):</div><div> return True</div></div><div><br></div><div>Whatever the problem is, it causes 'is_alive' 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'll tell you<br>
exactly what each thread is busy with when you send the signal.<br></blockquote><div><br></div><div>Thanks, I'll check this out.</div><div>- Claudiu</div></div>