So I still experience this problem from time to time (every 3-4 weeks). Each time, I attempt to make some program changes to attempt to alleviate the problem, such as staggering the two MQTTPUB commands so they don't try to access the same host at the same time, a short time delay between to stay within data writing limits, sending an EMAIL when the buffer fills up, etc.
The problem is now as such
The (2) MQTTPUB instructions "hang up" for some reason. They set the Error bit, and the PLC keeps queuing the data, once queue is full, it puts it on SD card, etc. The bulk of the data is multiple sensor readings every minute.
The error EMAIL never sends.
I (or the customer) notice that the data is not being published to the cloud.
I connect to device via StrideLinx VPN, log into PLC.
The two MQTTPUB sequences are in "waiting" mode, waiting for their next scheduled retry, every 30 minutes.
The EMAIL sequence is sitting waiting on the next retry to come up, which has been trying in 30 minute intervals for days.
-I have gotten into the habit of doing a DNSLOOKUP (8.8.8.8 and 208.67.220.220) and PINGing the IP address before sending. It has been showing DNSLOOKUP error since the start of the hang up
Now the odd thing is if I leave everything alone, the EMAIL will succeed on it's next attempt, and the MQTTPUB's start rolling as their next time comes up.
So, I'm lead to believe it's a DNS type issue? I'm not sure if it's the action of connecting to the VPN router that lets the DNS request through (or connecting to the PLC).
The VPN router is set to obtain both IP address and DNS servers automatically from customer's router.
Should I set the BRX's DNS at the VPN router's IP address? Both in the DNSLOOKUP instruction and the Ethernet setup?
I will add that the BRX was set to a subnet mask of 255.255.255.255, which I have now changed to 255.255.255.0, but I don't think that affects anything, as a test EMAIL will go through regardless of subnet mask and VPN connection status. Also, Modbus TCP Scanner seemed to have no issues connecting to clients with the overly restrictive mask.