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 "Unable to connect to remote host specified by 'http://10.1.1.1/' SQLCODE=-981..."

set option remote_idle_timeout = 1;

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

asked 16 Mar '16, 16:00

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
2.5k233560
accept rate: 15%

edited 17 Mar '16, 04:27

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...

(17 Mar '16, 04:47) Volker Barth

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.

(17 Mar '16, 08:18) Breck Carter
Replies hidden

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.

(17 Mar '16, 10:07) Thomas Dueme...
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×198
×21

question asked: 16 Mar '16, 16:00

question was seen: 364 times

last updated: 17 Mar '16, 10:07