SimpleXMLRPCServer timeout issue

Mahi Haile begin.middle.end at
Wed Aug 26 20:10:27 CEST 2009

Hi all,
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/", line 464, in process_request_thread
    self.finish_request(request, client_address)
  File "/python2.5/", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/python2.5/", line 522, in __init__
  File "/python2.5/", line 316, in handle
  File "python2.5/", line 310, in handle_one_request
  File "/python2.5/", line 481, in do_POST
  File "/python2.5/", line 262, in write
  File "/python2.5/", 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.

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list