Disconnected while loading large scenes

Hello, first post here. After upgrading my project from PUN1 to PUN2, I noticed that my smaller scenes load just fine, but my large scene which takes between 10 and 45 seconds to load results in a disconnect on slower machines about 2 seconds after the level is loaded. If the machine loads it quickly, there is no disconnection. Per the Analyzing Disconnects page, the fix for Unity users was to make sure that the PhotonNetwork.IsMessageQueueRunning = false before loading and re-enabling it after. My project already had that code built in and was working just fine on all scenes and machines before the upgrade to PUN2. In other words, that fix is not working on PUN2 for me. After these tests, I'm thinking PUN2 has a regression on this issue. Has anyone else had this problem?

Comments

  • Confirmed this again by reverting back to PUN1 and it works as intended again, allowing me to enter the level without disconnect. I opened the PUN2 copy and again get disconnected if the load time exceeds around 20 seconds.
  • Hi @Omzy,

    Thank you for choosing Photon and sorry for the delay!

    I think the discussion here is related to this one.
  • Solved my issue by increasing the value of KeepAliveInBackground in ConnectionHandler.cs from 30000ms to 200000ms. This is the fallback thread which maintains connection while doing things like loading scenes. If the scene is large enough or the hardware low-end, the load may take a lot longer than 30 seconds, so increasing this value may make sense. I believe it was increased to 60000ms in the most recent version of PUN2.
Sign In or Register to comment.