This object is in archive! 

MP-Player join and server freeze

Alexandre shared this bug 3 years ago
Won't Fix

Hi there,

On the public server UK#5 we have been experiencing a major problem that is; every time a new player joins the server, the whole world freezes for a few seconds. We confirmed that because everybody experienced exactly the same thing, we all see the "Game Paused" message at the top and "Connection Problem" in red at the bottom. This freeze can take from a couple of seconds to 10 and some people reported experiencing over 15 seconds of freeze. Please look into this problem as I made a report on Steam but was told to come here and report here.


Ps.; There's no log I can send or anything to show you guys how this problem occurs, just join the official server UK#5 and watch what happens every time someone log in. It's unplayable at this point.

Thanks.

Replies (5)

photo
4

Duplication of: Serious server lag spike when player joining to server

photo
2

Hello, Alexandre,

thanks for letting us know about the issue you are experiencing. Right now we are trying to reproduce the issue and gather as much info as possible.

As soon as we will reproduce it, we´ll change the status of this tread accordingly so you have relevant and up-to-date information.

Hope you understand and we are sorry for any inconvenience this might bring to you while playing. We want this issue to be fixed as soon as possible, same as you.

Thanks for your patience.

Kind Regards

Keen Software House: QA Department

photo
3

I actually fixed this in a torch plugin. This 100% is an issue with client-side world requests running on the game thread as well as server saving since they both run the same code. Since this is basically grabbing all required meta-data for the client. Meaning all identities, gps, toolbars are grabbed, iterated, and spat into a data structure to be sent to the client. However for example, after it grabs everything, it then goes back through and iterates again to cleanup the data and remove stuff the client doesnt need.


I noticed that the largest server (with 3750 unique identities) could take up to 10secs of server freeze time to iterate and send to the client. Upon investigating, there only needs to be a few methods that need to be ran on the game thread to actually get the required objectbuilders. I moved everything else off the game thread, and now there is no issue or freeze when the server saves or when a player joins. Went from 10 secs to 0 freeze time and also sending the world to the client is quicker.


(I also just created my own client world request since iterating and sending things such as toolbars of all players in the sandbox is kinda useless)

For the method from my own tests that took the longest:

Sandbox.Game.World.MySession.GetCheckpoint

- Sandbox.Game.Multiplayer.MyPlayerCollection.SavePlayers

The save players when it cycles all m_playerIdentityIds is whats taking the longest with 4 secs to iterate through the 3750 unique identities. This doesn't even have to be on the game thread!


There are other spots in the GetCheckpoint that I cleaned up and if you so desire, id be willing to share those changes.

photo
1

Hello!


This issue should be already fixed, can you please confirm?

Thank you!


Kind Regards

Keen Software House: QA Department

photo
1

Hello Engineer,


Since there are no new comments in this topic, we are closing this thread as outdated.

In case anyone is encountering the same or similar bug, which is not already posted in a

different thread, please feel free to create a new thread with all relevant information.

Thank you.


Kind Regards

Keen Software House: QA Department

Replies have been locked on this page!