MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Unreliable sockets

    Scheduled Pinned Locked Moved Bug Hunt
    2 Posts 2 Posters 364 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Mystara
      last edited by

      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!

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Mystara
        last edited by

        @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.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy