No subject


Sat Dec 10 13:40:36 UTC 2011


>
either the paster configuration options for anything related to<br>
timeouts, thread pools, handling of incomplete requests and so on. Or<br>
use a more production quality web server like Apache (mod_wsgi), Nginx<br>
(gevent/gunicon) which likely has better default configuration values<br>
for these things.<br></blockquote><div><br></div><div>The problem from my p=
revious email was indeed hung requests. However, the</div><div>stack trace =
for those looked different:</div><div><br></div><div><div style>Thread 1406=
05868680960:</div>
<div style>=A0 File &quot;/usr/lib/python2.6/threading.py&quot;, line 504, =
in __bootstrap</div><div style>=A0 =A0 self.__bootstrap_inner()</div><div s=
tyle>=A0 File &quot;/usr/lib/python2.6/threading.py&quot;, line 532, in __b=
ootstrap_inner</div>
<div style>=A0 =A0 self.run()</div><div style>=A0 File &quot;/usr/lib/pytho=
n2.6/threading.py&quot;, line 484, in run</div><div style>=A0 =A0 self.__ta=
rget(*self.__args, **self.__kwargs)</div><div style>=A0 File &quot;/home/ts=
a/env/lib/python2.6/site-packages/paste/httpserver.py&quot;, line 878, in w=
orker_thread_callback</div>
<div style>=A0 =A0 runnable()</div><div style>=A0 File &quot;/home/tsa/env/=
lib/python2.6/site-packages/paste/httpserver.py&quot;, line 1052, in &lt;la=
mbda&gt;</div><div style>=A0 =A0 lambda: self.process_request_in_thread(req=
uest, client_address))</div>
<div style>=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/paste/h=
ttpserver.py&quot;, line 1068, in process_request_in_thread</div><div style=
>=A0 =A0 self.finish_request(request, client_address)</div><div style>=A0 F=
ile &quot;/usr/lib/python2.6/SocketServer.py&quot;, line 322, in finish_req=
uest</div>
<div style>=A0 =A0 self.RequestHandlerClass(request, client_address, self)<=
/div><div style>=A0 File &quot;/usr/lib/python2.6/SocketServer.py&quot;, li=
ne 617, in __init__</div><div style>=A0 =A0 self.handle()</div><div style>=
=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.p=
y&quot;, line 442, in handle</div>
<div style>=A0 =A0 BaseHTTPRequestHandler.handle(self)</div><div style>=A0 =
File &quot;/usr/lib/python2.6/BaseHTTPServer.py&quot;, line 329, in handle<=
/div><div style>=A0 =A0 self.handle_one_request()</div><div style>=A0 File =
&quot;/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.py&quot;, =
line 437, in handle_one_request</div>
<div style>=A0 =A0 self.wsgi_execute()</div><div style>=A0 File &quot;/home=
/tsa/env/lib/python2.6/site-packages/paste/httpserver.py&quot;, line 287, i=
n wsgi_execute</div><div style>=A0 =A0 self.wsgi_start_response)</div><div =
style>
=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/repoze/zodbconn/co=
nnector.py&quot;, line 21, in __call__</div><div style>=A0 =A0 result =3D s=
elf.next_app(environ, start_response)</div><div style>=A0 File &quot;/home/=
tsa/env/lib/python2.6/site-packages/repoze/zodbconn/cachecleanup.py&quot;, =
line 25, in __call__</div>
<div style>=A0 =A0 return self.next_app(environ, start_response)</div><div =
style>=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/repoze/retry=
/__init__.py&quot;, line 65, in __call__</div><div style>=A0 =A0 chunk =3D =
original_wsgi_input.read(rest)</div>
<div style>=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/paste/h=
ttpserver.py&quot;, line 474, in read</div><div style>=A0 =A0 data =3D self=
.file.read(length)</div><div style>=A0 File &quot;/usr/lib/python2.6/socket=
.py&quot;, line 377, in read</div>
<div style>=A0 =A0 data =3D self._sock.recv(left)</div></div><div style><br=
></div><div style>Note the line it blocks on is &quot;self._sock.recv(left)=
&quot;, well after the response started.=A0</div><div style>In the trace I =
just provided,=A0the block was on opening the DB connection *at the start o=
f the request*:</div>
<div style><br></div><div style>=A0 ...</div><div style><div><b>=A0 File &q=
uot;/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.py&quot;, li=
ne 287, in wsgi_execute</b></div><div><b>=A0 =A0 self.wsgi_start_response)<=
/b></div>
<div>=A0 File &quot;/home/tsa/env/lib/python2.6/site-packages/repoze/zodbco=
nn/connector.py&quot;, line 18, in __call__</div><div>=A0 =A0 conn =3D self=
.db.open()</div><div><b>=A0 File &quot;/home/tsa/env/lib/python2.6/site-pac=
kages/ZODB/DB.py&quot;, line 729, in open</b></div>
<div><b>=A0 =A0 self._a()</b></div><div>=A0 File &quot;/usr/lib/python2.6/t=
hreading.py&quot;, line 123, in acquire</div><div>=A0 =A0 rc =3D self.__blo=
ck.acquire(blocking)</div><div><br></div><div>Why would the database start =
blocking on opening a new database connection? The</div>
<div>issue does indeed seem to be with ZODB.=A0</div><div><br></div><div>Th=
anks,</div><div>- Claudiu</div></div></div>

--f46d04428dc085d02704bf756678--


More information about the ZODB-Dev mailing list