Read the statement by Michael Teeuw here.
Unreliable sockets
-
I’ve been trying to debug an error that I’ve been having with MMM-BackgroundSlideshow and my investigations have brought me to MM itself.
In short, the background on MMM-BackgroundSlideshow was sticking on my system. The cause of this is that a return notification from the node_helper doesn’t always arrive back at the module. Debugging indicates that it’s transmitted, but it doesn’t always arrive.
My pi occasionally loses internet connectivity briefly and it makes sense that this could be causing the problem. One possibility is that the socket dies whenever internet connectivity goes down. Another possibility is that the node_helper is transmitting data when the connection is down and so it never arrives.
I’m not sure which, and I’m not sure what the fix would be.
Firstly, is it possible for a socket to die in this way?
Secondly, is there any kind of built in ACK mechanism that can be applied to a sendSocketNotification?Thanks!
-
@mystara yes it’s possible for the socket to die without informing the application layer.
I spent about a year debugging a hang on one of my modules in a similar situation.
I added MMM-WatchDog, which also exhibited the same problem.in the end I replaced the networking w a google wifi cluster and have not seen the problem since. altho I could never trace down to a network failure.
I don’t know if socket.io can inform the application layer of a problem. it does all kinds of recovery under the covers.