I've been working on getting around the timeout problem I posted earlier. I thought that my problem was due to using Python 2.4. I've since done some testing with Python 2.7 and PyPy 1.6. Both of them have the same behavior.
Here's the scenario. I run this line to create the client;
client = Client(wsdl)
I set up the filters to the service that I'm calling so that it will retrieve a large amount of data. When I run the service it times out after 90 seconds. Next I try creating the client by adding a timeout value.
client = Client(wsdl, timeout=120)
Now the service times out after about 120 seconds. Finally I try this;
client = Client(wsdl, timeout=240)
The service times out at 180 seconds. It doesn't matter what timeout value I use. Anything above 180 is the same.
I tried setting the default socket value to a large number like this;
import socket socket.setdefaulttimeout(240)
After that can look at the socket.getdefaulttimeout() and verify that it's set to 240. I tried that and then tried to create the client again without setting the timeout. According to the documentation, not setting the timeout causes it to use the global default but even if the global default is 240, the suds timeout is 90.
Is this a bug or am I missing something?
Joe Goldthwaite
Have a look at John Nagle's comments here: http://www.gossamer-threads.com/lists/python/python/563167
Though old, it seems like this may apply to your case. The only thing that I can think of is that perhaps that hard 180 limit is actually the stack's on one of the endpoints, and your timeout value is being trumped by one end or the other. Just a possibility to confirm up or down though.
By chance, have you run a capture to see who is closing down the socket? That may be a good bit of data.
--Matt
On Wed, Aug 17, 2011 at 3:09 PM, Joe Goldthwaite joe@goldthwaites.comwrote:
I've been working on getting around the timeout problem I posted earlier. I thought that my problem was due to using Python 2.4. I've since done some testing with Python 2.7 and PyPy 1.6. Both of them have the same behavior.
Here's the scenario. I run this line to create the client;
client = Client(wsdl)
I set up the filters to the service that I'm calling so that it will retrieve a large amount of data. When I run the service it times out after 90 seconds. Next I try creating the client by adding a timeout value.
client = Client(wsdl, timeout=120)
Now the service times out after about 120 seconds. Finally I try this;
client = Client(wsdl, timeout=240)
The service times out at 180 seconds. It doesn't matter what timeout value I use. Anything above 180 is the same.
I tried setting the default socket value to a large number like this;
import socket socket.setdefaulttimeout(240)
After that can look at the socket.getdefaulttimeout() and verify that it's set to 240. I tried that and then tried to create the client again without setting the timeout. According to the documentation, not setting the timeout causes it to use the global default but even if the global default is 240, the suds timeout is 90.
Is this a bug or am I missing something?
Joe Goldthwaite
suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds