Multiplayer plugin - host disconnects after few hours

  • Problem Description

    Multiplayer plugin - host and any peers disconnect after ~24 hours.

    Attach a Capx

    (Use original Multiplayer - realtime capx found in Construct 2 templates)

    Description of Capx

    Exact same as template.

    Steps to Reproduce Bug

    • Run the capx, and join game as host.
    • Run a second tab, and join game as a peer.
    • Wait 12-24 hours or so (you can leave both tabs open OR minimize one, OR minimize both)

    Observed Result

    Host and Peer both disconnect from the server after an arbitrary amount of time (usually somewhere in the 12-24 hour range).

    I get a "Signalling disconnected" message in the chat log. Nothing out of the ordinary appears in the web console.

    Expected Result

    Should be able to run the "server" continuously. I am trying to have one peer serve as the host/dedicated server, this won't work if the host disconnects everybody for some unknown reason after several hours.

    To my knowledge, my internet connection was maintained throughout the duration of the test.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Internet Explorer: Did not test

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    r248

  • Typically while investigating a bug we have to try the repro steps dozens of times. If the steps include "wait 12-24 hours", it's going to be a lot harder. Any diagnostic information you can provide at all about the nature of the problem or precisely what timing it happens with would be useful.

  • Ashley I wish I had more info then what I provided. I could keep running tests but I don't see how that will help, I've done it about 6-7 times. Could you possibly try this overnight tomorrow, and just see what happens? Could you try running the ghost shooter multiplayer demo and seeing if it can last longer than a day? (has it ever in the past?)

    Let me know if there's anything specific that you want me to provide, but like I said nothing shows up in the web console - the host just simply disconnects some random time after 12 hours or so.

    We discussed this issue here:

  • Could this be a regression of THIS old chromium issue, that also somehow applies to tabs that have been out of focus for a while?

    @Badmiracle I know this won't help much with other browsers than NW.js but could you try to enable this chromium-arg and run the test again.

    --disable-background-timer-throttling[/code:2y4hefb9]
  • I'll give that a shot, but I came across the same issue w/ Firefox. Will keep you guys posted!

    @TheRealDannyyy would you mind running a test as well and letting me know if it disconnects by morning?

    I've also been experimenting with running just 1 tab (the host) w/ no peers. Once chrome crashed, and the second time I made it past the 24 hour mark which was promising, then I closed it manually.

  • I'll give that a shot, but I came across the same issue w/ Firefox. Will keep you guys posted!

    TheRealDannyyy would you mind running a test as well and letting me know if it disconnects by morning?

    My Internet connection is very unstable and goes down for a second or two sometimes. I'm not sure if that would be useful at all.

    I've also been experimenting with running just 1 tab (the host) w/ no peers. Once chrome crashed, and the second time I made it past the 24 hour mark which was promising, then I closed it manually.

    Chrome crashed? That's really odd, I doubt that Construct 2's multiplayer could be at fault for that.

    Chrome should store the crashlogs somewhere, they might be useful for solving or reporting this issue to Chromium Upstream, if it should come to that at some point.

  • Good point. I'll see if it happens again.

    I remember paying for a cheap VPS at some point, and I would get Chrome crashing on that server quite often, I always assumed it was a mem issue or something else (not MP plugin related) anyway.

    Hopefully some others (if not Ashley himself) can test this and see if they get disconnected as well.

  • I just remembered our signalling server used to host a multiplayer game demo, and it successfully hosted for weeks at a time. So I would guess the problem is not with C2, the browser, or the server. I'd guess there's something in your network configuration that kills connections after a long timeout.

  • Thanks for the info Ashley. I'm going to continue testing (on a different network with a VPS) and see if something has changed since the last time you hosted the game running the multiplayer plugin and I'll let you guys know.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lxmlxmckxlc oidsncosan oncjc jcnncj

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)