[ZODB-Dev] server stops handling requests - nowhere near 100% CPU or Memory used
Alexandre Garel
alex.garel at tarentis.com
Fri Apr 20 14:31:24 UTC 2012
Le 20/04/2012 16:06, Claudiu Saftoiu a écrit :
>
> Ah, so it seems that, as I leave the server running longer & longer,
> more & more threads are taken up with a `.recv()` call. I think one of
> my clients opens requests and does not read them/close them.
> Eventually
> all the threads are blocking in that fashion.
>
> I will fix my clients. But, is there a server-side fix to this
> (again, using Repoze.BFG)?
> Something to time out the connection after 60 seconds or so if
> nothing has happened?
>
>
> Additional info: in particular the blocked threads' stack dumps look
> like this:
>
> Thread 140605868680960:
> ---------- [snip]----------
> File
> "/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.py", line
> 474, in read
> data = self.file.read(length)
> File "/usr/lib/python2.6/socket.py", line 377, in read
> data = self._sock.recv(left)
>
> Was my assessment of the situation accurate?
I would say so, and it seems that what makes the thread hang on is that
the socket is not closed by your clients. (otherwise recv would exit
with an exception).
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/zodb-dev/attachments/20120420/46816bd9/attachment.html>
More information about the ZODB-Dev
mailing list