[XML-SIG] 20 second socket.addrinfo() delay in SimpleXMLRPCServer
Mark Bucciarelli
mark@easymailings.com
Thu, 2 Jan 2003 22:21:03 -0500
I'm experiencing some strange behavior with the SimpleXMLRPCServer. I've=
=20
traced it as far as I can go, and would appreciate suggestions on further=
=20
debugging.
The first strange behavior is that a simple echo function takes 20 second=
s to=20
respond. I've traced this delay to the httplib.HTTPConnection class, whe=
re=20
the call to socket.getaddrinfo() in the connect() routine is responsible =
for=20
this entire delay. Based on my extensive Windows experience, I did manag=
e to=20
make the error go away by rebooting my computer. ;) But it came back. :=
( =20
Once back, it sticks around.
How can I debug what's happening in the _socket.getaddrinfo() method?
Is this a known problem with Python 2.2.1? GCC 3.2? RedHat 8.0? Linux=20
Kernel 2.4.18-14? Dell Inspirons?
The other strange behavor occurs in the python interpreter. On occasion,=
when=20
I type in a command like server =3D xmlrpclib.Server("http://localhost:80=
00")=20
or server.echo('test'), the memory usage for the interpreter spikes (up t=
o=20
75%, per "top") stays there for around three minutes, at which point the=20
interpreter decides it's had enough and appends the string "Killed" and e=
xits=20
back to the command prompt. =20
In the pre hari-kari period, I've seen the load average go as high as 7.8=
=2E =20
Once in this state, I was able to duplicate this behavior four times in a=
=20
row. When I restarted the xml rpc server, everything went back to workin=
g=20
normally.
I'm running RedHat 8.0 on a Dell Inspiron 4100, with 256M RAM.
Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2
Mark