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/SocketServer.py", line 464, in process_request_thread self.finish_request(request, client_address) 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__ self.handle() File "/python2.5/BaseHTTPServer.py", line 316, in handle self.handle_one_request() File "python2.5/BaseHTTPServer.py", line 310, in handle_one_request method() File "/python2.5/SimpleXMLRPCServer.py", line 481, in do_POST self.wfile.write(response) File "/python2.5/socket.py", line 262, in write self.flush() File "/python2.5/socket.py", line 249, in flush self._sock.sendall(buffer) 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,
-- http://mail.python.org/mailman/listinfo/python-list