Forum Replies Created
The past days I have performed several tests using different implementation of websocket. All the time I get 40-50k messages before the link become silent, but from time to time I receive close to 100k messages before the link become silent.
My workaround is to have a small “CheckIfDataStilOnLink” function and if result is false I disconnect and connect the websocket link and everything is fine for the next 40-50k messages.
Few seconds ago, I checked the status of my NodeJS test app, and during the last round it received 98888 messages before the link became silent. I will let it continue the test during the night and check the log again tomorrow morning.
I have tested for a longer period using the hosted Websocket logger app. Unfortunately, the websocket data stream become silent after a while.
Also, I have rewritten my node app and have tested it with different node modules for websocket connection. The one which are the most stable is ws (look at npm ws).
After approximately 42500 +/- 2000 messages the link become silent. No messages from iKommunicate, but the link is up and stated as OK seen from the client. When it has been silent for approximately 1,5 minute, I send ws.close() and after received the acknowledge I establish a new connection and everything is OK for the next approximately 42500 websocket messages. I have run this test the past 24 hours, and the link become silent all the time after 42500 +/- 2000 messages.
So, I think the solution for my sailboat server is to have a routine that verify that there is data on the websocket link; If no data for a couple of minutes then disconnect the connection and establish a new websocket connection
The dreamer and sailor from Norway