intervall of about 1 second for xmlrpc calls?

Adam Tauno Williams awilliam at whitemice.org
Fri May 21 08:16:27 EDT 2010


On Fri, 2010-05-21 at 02:10 -0700, rav wrote:
> I had similar problem with SimpleXMLRPCServer
> Create the request handler class
> class ExtendedXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
>     # originally this one was slowing down my server A LOT due to DNS
> settings!!!
>     def log_request(self, *args):
>         pass
> and put it in your SimpleXMLRPCServer constructor
> (...)
> class MyServer(threading.Thread):
>     def __init__(self, host, port):
>         threading.Thread.__init__(self)
>         self.server = SimpleXMLRPCServer((host, port),
> ExtendedXMLRPCRequestHandler)
>         self.server.register_function(self.is_even, "is_even")
>         self.server.register_function(self.stop, "stop_server")
> (...)
> I would also change all 'localhost' occurences in the code to ip
> '127.0.0.1'.

Or the better solution is to fix your resolver.
-- 
Adam Tauno Williams <awilliam at whitemice.org> LPIC-1, Novell CLA
<http://www.whitemiceconsulting.com>
OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba




More information about the Python-list mailing list