I have to download each minute a small json file from a handful of IoT http servers. That works great when all devices response properly. In case a device is not reachable I experience a long time out. After 20sec I get a Error Code "
Setting the above option does not change the behavior. I would prefer that after few second the procedure fails gracefully and my script can continue with the next device. Probably somebody has a idea Thomas |
Funny: I just happened to have an issue myself with web client timeouts yesterday - if I call a web service the first time, I often get a SQLCODE -982 "Connection timed out" error. Simply retrying the request then usually succeeds.
In my situation, the mentioned option does make a difference, so thanks for sharing that knowledge (I wasn't aware of that option at all).
However, in your case there's a different error (-981) meaning the remote host could not be reached at all - in contrast to take to long to respond as with error -982. So I guess that's why that option may not apply here...
Unfortunately, I do not know how to influence that other kind of timeout...
The client timeout may be under the exclusive control of the server (which in this world of evil-doers, that's where control should remain).
FWIW Foxhound uses the dbsrv17 -xs http(port=80;maxsize=0;to=600;kto=600) options to solve timeout issues.
See Timeout (TO) protocol option and KeepaliveTimeout (KTO) protocol option.
These options are used when SA is a HTTP Server. I request data from a different HTTP Server where I can't be sure that the device is always reachable.