Websocket Loses Connection
Home › Forums › Conduit: AEP Model › Websocket Loses Connection
- This topic has 8 replies, 3 voices, and was last updated 7 years, 7 months ago by Peter Ferland.
-
AuthorPosts
-
April 1, 2017 at 1:14 pm #18119Paul ChiltonParticipant
I’ve got a simple Node-RED flow setup to send and receive packets over a websocket and this generally works quite well however the connection drops out at times (presumably because of a 3G glitch) and then takes a long time before it reconnects (maybe an hour!).
Is there any reason for this or a way I can get it to reconnect straight away after the connection has been dropped? Ideally the first time it tries to send a message over the stale connection it should just reconnect itself…
April 3, 2017 at 2:52 pm #18130Peter FerlandBlockedOn the cellular page of the admin dashboard do you have keep alives enabled?
April 4, 2017 at 12:53 pm #18139Paul ChiltonParticipantHi, no I haven’t at the moment. I did look into those settings but couldn’t figure out what to set as the hostname. Is this just any old web server that it can ping or does it need to be running a specific service?
Thanks
April 4, 2017 at 1:11 pm #18141Peter FerlandBlockedIts a simple ping, so just entering google.com would work.
- This reply was modified 7 years, 7 months ago by Peter Ferland.
April 4, 2017 at 1:26 pm #18143Paul ChiltonParticipantOk thanks, I’ll give that a go and see if it helps.
April 4, 2017 at 3:05 pm #18144Tom HillParticipantHi Peter,
Enabling the keep alive on the cellular connection, does it have any performance impact, or is it just to ensure the cellular connection is kept alive? I use http request node in my node-red flows extensively and so I check if the PPP connection is up using the internal web api provided by multitech using the URL http://127.0.0.1/api/ppp and look at the JSON result if the PPP link is up or down and I do this every 10 minutes.
However if enabling the keep alive in the cellular configuration tab is a better way to check this, I would rather use that? Do you have any suggestions?
Thanks,
YogeshApril 4, 2017 at 4:23 pm #18157Peter FerlandBlockedThe keep alive feature periodically sends the a small amount of data to keep the cell connection up. If the connection fails, the ppp link is restarted. If you take different actions based on the ppp status (e.g. storing more data) then you should keep checking. If the only action you’re taking is to reset the ppp link, then you can rely on the built in keep alive feature to do that.
April 4, 2017 at 6:22 pm #18159Tom HillParticipantThanks Peter, that is exactly what I am doing, when the cell connection is down, I backup the data I am sending via the http request node, so when it is back up and I can send all the packets that were missed out from being transmitted. However I am not sure how I would reset the PPP link from node-red and I don’t do that currently.
So it seems like the keep alive feature seems to be OOB feature that I could use to reset the PPP link. Should I be using the defaults for the settings? I see that I could hit a public portal such as google.com as you suggested earlier, how often does it ping?
Thanks,
YogeshApril 5, 2017 at 8:51 am #18165Peter FerlandBlockedIts configurable. The ICMP/TCP Check interval field defaults to 10 minutes.
-
AuthorPosts
- You must be logged in to reply to this topic.