SimpleXMLRPCServer timeout issue
begin.middle.end at gmail.com
Wed Aug 26 20:10:27 CEST 2009
I have an XML-RPC server running that is using SimpleXMLRPCServer, and I am
trying to send a relatively large file on a poor connection [simulated low
bandwidth, high latency]. The file is simply the return value of a function
call available on the server.
However, sometime in to the transfer, I get a timeout, seemingly regardless
of what I do. The server is initiated as follows:
s = SimpleXMLRPCServer((HOST, PORT), requestHandler = RequestHandler)
s.timeout = 100000 #I tried setting this to None, and also a higher number
And the exception I get is:
Traceback (most recent call last):
File "/python2.5/SocketServer.py", line 464, in process_request_thread
File "/python2.5/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/python2.5/SocketServer.py", line 522, in __init__
File "/python2.5/BaseHTTPServer.py", line 316, in handle
File "python2.5/BaseHTTPServer.py", line 310, in handle_one_request
File "/python2.5/SimpleXMLRPCServer.py", line 481, in do_POST
File "/python2.5/socket.py", line 262, in write
File "/python2.5/socket.py", line 249, in flush
timeout: timed out
Googling resulted in similar questions asked in the CherryPy forums, and the
general suggestions seem to be to use a streaming transfer, using yield
rather than return.
Do you know how I go about solving when using the SimpleXMLRPCServer? For
what it is worth, I am running the server on Mac OS X.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list