MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Unreliable sockets

    Bug Hunt
    2
    2
    146
    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
      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
        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

        Create a working config
        How to add modules

        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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy