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 "/usr/lib/python2.6/threading.py", line 504, =
in __bootstrap</div><div style>=A0 =A0 self.__bootstrap_inner()</div><div s=
tyle>=A0 File "/usr/lib/python2.6/threading.py", line 532, in __b=
ootstrap_inner</div>
<div style>=A0 =A0 self.run()</div><div style>=A0 File "/usr/lib/pytho=
n2.6/threading.py", line 484, in run</div><div style>=A0 =A0 self.__ta=
rget(*self.__args, **self.__kwargs)</div><div style>=A0 File "/home/ts=
a/env/lib/python2.6/site-packages/paste/httpserver.py", line 878, in w=
orker_thread_callback</div>
<div style>=A0 =A0 runnable()</div><div style>=A0 File "/home/tsa/env/=
lib/python2.6/site-packages/paste/httpserver.py", line 1052, in <la=
mbda></div><div style>=A0 =A0 lambda: self.process_request_in_thread(req=
uest, client_address))</div>
<div style>=A0 File "/home/tsa/env/lib/python2.6/site-packages/paste/h=
ttpserver.py", line 1068, in process_request_in_thread</div><div style=
>=A0 =A0 self.finish_request(request, client_address)</div><div style>=A0 F=
ile "/usr/lib/python2.6/SocketServer.py", line 322, in finish_req=
uest</div>
<div style>=A0 =A0 self.RequestHandlerClass(request, client_address, self)<=
/div><div style>=A0 File "/usr/lib/python2.6/SocketServer.py", li=
ne 617, in __init__</div><div style>=A0 =A0 self.handle()</div><div style>=
=A0 File "/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.p=
y", line 442, in handle</div>
<div style>=A0 =A0 BaseHTTPRequestHandler.handle(self)</div><div style>=A0 =
File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle<=
/div><div style>=A0 =A0 self.handle_one_request()</div><div style>=A0 File =
"/home/tsa/env/lib/python2.6/site-packages/paste/httpserver.py", =
line 437, in handle_one_request</div>
<div style>=A0 =A0 self.wsgi_execute()</div><div style>=A0 File "/home=
/tsa/env/lib/python2.6/site-packages/paste/httpserver.py", line 287, i=
n wsgi_execute</div><div style>=A0 =A0 self.wsgi_start_response)</div><div =
style>
=A0 File "/home/tsa/env/lib/python2.6/site-packages/repoze/zodbconn/co=
nnector.py", line 21, in __call__</div><div style>=A0 =A0 result =3D s=
elf.next_app(environ, start_response)</div><div style>=A0 File "/home/=
tsa/env/lib/python2.6/site-packages/repoze/zodbconn/cachecleanup.py", =
line 25, in __call__</div>
<div style>=A0 =A0 return self.next_app(environ, start_response)</div><div =
style>=A0 File "/home/tsa/env/lib/python2.6/site-packages/repoze/retry=
/__init__.py", line 65, in __call__</div><div style>=A0 =A0 chunk =3D =
original_wsgi_input.read(rest)</div>
<div style>=A0 File "/home/tsa/env/lib/python2.6/site-packages/paste/h=
ttpserver.py", line 474, in read</div><div style>=A0 =A0 data =3D self=
.file.read(length)</div><div style>=A0 File "/usr/lib/python2.6/socket=
.py", 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 "self._sock.recv(left)=
", 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", li=
ne 287, in wsgi_execute</b></div><div><b>=A0 =A0 self.wsgi_start_response)<=
/b></div>
<div>=A0 File "/home/tsa/env/lib/python2.6/site-packages/repoze/zodbco=
nn/connector.py", line 18, in __call__</div><div>=A0 =A0 conn =3D self=
.db.open()</div><div><b>=A0 File "/home/tsa/env/lib/python2.6/site-pac=
kages/ZODB/DB.py", line 729, in open</b></div>
<div><b>=A0 =A0 self._a()</b></div><div>=A0 File "/usr/lib/python2.6/t=
hreading.py", 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