xmlrpc.server.work() does not seem to handle multiple requests

J

john14

Hi,

I have an xmlrpc server. I using the python package
xmlrpc. Here is what I am doing:

s = xmlrpc.server()
s.addMethods(method_hash)
s.bindAndListen(PORT)
while 1:
try:
s.work()
except:
e = sys.exc_info()

The problem is that when I send multiple requests they are queued and
processed one after the other. Is there some other method that will allow
me to process multiple request at the same time?

Thank You
 
P

pythonUser_07

Unfortunately no because this is a single threaded http server. It's
great for testing stuff out, but it doesn't scale unless you make it
scale. I am assuming you could use the Zope application server to
scale your code.
 
A

Adonis

john14 said:
Hi,

I have an xmlrpc server. I using the python package
xmlrpc. Here is what I am doing:

s = xmlrpc.server()
s.addMethods(method_hash)
s.bindAndListen(PORT)
while 1:
try:
s.work()
except:
e = sys.exc_info()

The problem is that when I send multiple requests they are queued and
processed one after the other. Is there some other method that will allow
me to process multiple request at the same time?

Thank You

Check out this snippet look at the end for user comments to get a
multi-threaded or forking version.

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81549

Hope this helps.

Adonis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top