Search Unity

Unity Multiplayer Network Manager dissappears after a couple hours?

Discussion in 'Multiplayer' started by FoxCastz, Dec 8, 2019.

  1. FoxCastz

    FoxCastz

    Joined:
    Jun 18, 2015
    Posts:
    75
    I have been making a game that has the ability to self host, but I also have a computer on the side to run as somewhat of a dedicated host which players will automatically join if they don't want to host their own or connect to someone else. The issue is that I found from testing is that eventually (~4 hours into running on the editor) that the Network Manager just disappeared. This is an issue because I can't always be around to restart the game on the server computer when it stops working. It took a long time to figure out why the server would just freeze up.

    P.S. I watched the profiler for hours and there was no memory leaks and it tends to clean itself up because the server changes scenes every 10 minutes.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    10,795
    Can you elaborate, what do you mean by disappeared? Do you mean you have Null objects? Are you receiving an error?
     
  3. FoxCastz

    FoxCastz

    Joined:
    Jun 18, 2015
    Posts:
    75
    This is happening on the server instance of the game.
    Normally the Network Manager is in the Do Not Destroy tab and the game changes scenes as needed using serverchangescene() when a match is over and a new match begins. This all works, but within 2~4 hours, the server version of the game will freeze.
    So what I did was run it in the editor for ~4 hours and came back to see the game frozen and the Network Manager was just simply gone. No error messages in the log and I never get error messages out of the built version either.
     
unityunity