I am using the WebClient FB of the IIoT library. When using urls with the domain name instead of the IP address, the function block contacts the DNS (Domain Name Server) to resolve the IP address. However, if the DNS is not reachable, the WebClient functionblock gets blocked for a certain amount of time. On my ctrlX node for 10s, on another ctrlX I have seen 20s. The task that is running the functionblock stops running while the functionblock is blocked. The issue can be reproduced by:
Use a 1:1 connection between the engineering PC and the ctrlX XF10 (no other connections on the ctrlX)
Manually configure a DNS server, the IP adress should not be the same as the ctrlX or the engineering PC
Send out an request through the WebClient function block, e.g. https://www.boschrexroth.com/
The function block gets stuck for 10 and then generates an error and shows RESOLVE_HOSTNAME_FAILED.
For the exampe below the task shows a max cycle time of 10001583us ~= 10s
There are two issues here:
The timeout of the request is not determined by the timeout of the functionblock (above the timout is set to 3s, the functionblock was blocked for 10s)
The functionblock stops its task from running, stopping all logic in the task from executing