How to set timeout on SUDS connection
Asked Answered
L

1

6

I'm struggling with what should be a very simple problem. I'm failing to set the session timeout on a SUDS jurko connection. My WSDL is good. Everything works when pulling a smaller dataset. I've attempted several means of setting the timeout. While the following doesn't complain/etc, it also is ineffective:

from suds.client import Client
client = Client(authUrl, timeout=600)

My connection/etc appears to fail after the default 90 seconds. Unfortunately, this just isn't long enough to get the data I need. The error I receive is

ssl.SSLError: ('The read operation timed out',)

Help! My Google foo is weak, I guess. I've tried many things... and, finally, I have to ask for help. Which will be greatly appreciated...

Lorraine answered 2/12, 2016 at 19:20 Comment(4)
probably helpful if you include your WSDL.Rocaille
The WSDL is fine. I'm successfully pulling data. The problem I'm facing is that the DEV copy pulls only ~1,000 records. The PROD copy (same WSDL, different server) pulls ~20,000 records. I'm just getting a timeout. Unfortunately, I can't easily post the WSDL. It's on a separate machine/network/etc.Lorraine
Which version are you running?Dita
Sorry, folks -- I've since moved to a different project (and company). I never did find a way around this. The root cause/condition (IIRC) was that the volume of data was simply too great. I no longer have access to the code. I've mercifully been spared the horror of dealing with SOAP since that time. :-) Good luck to the less fortunate!Lorraine
N
0

While this will not help the OP I think that it is worth mentioning that under Python 3.9 the call to Client(...., timeout=300) seems to be working with sudz version 1.0.3 from https://github.com/Skylude/suds - so I guess that this issue has been resolved.

Nancinancie answered 29/9, 2021 at 11:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.