We are making a multiplayer experience where a server is hosted on a Windows PC. It is not a dedicated server so the Windows player joins in as a 1st person character.
All the joining clients are using the Oculus Quest VR headset.
Now, everything works great when up to 2 Quest clients have joined in. When a 3rd Quest connects, one quest randomly gets disconnected. (In most of the cases, it is the 3rd one). We have optimized and profiled lots of times and the bandwidth used is coming out to be relatively low. So, that is not the reason.
Has anyone run into this kind of problem? Am I missing something that can cause disconnects like these?
I would start by first checking the server logs to find out why the client was disconnected. A common reason for this happening is calling RPCs that are marked as Reliable too frequently (e.g. inside a tick function), which will show up in the logs as “Closing Connection… Reliable buffer overflow.” The docs mention this here and you can see an example here. Hope that helps!
Reliable events are guaranteed to reach their destination (assuming the ownership rules above are followed), but they introduce more bandwidth, and potentially latency, to meet this guarantee. Try to avoid sending reliable events too often, such as on every tick, since the engine’s internal buffer of reliable events may overflow - when this happens, the associated player will be disconnected!
Thank you for the reply! I will check the logs and see anything unusual. There aren’t any reliable RPCs being sent on tick/frequently, so I think that should not be the cause.
I was able to identify the issues. There are 2 factors responsible for the client timeout.
When an Oculus Quest goes out of the guardian, the client timeout timer starts on the server. Now, ideally it should stop once the Quest comes back inside the guardian, but it does not.
If an Oculus Quest goes to sleep, the client timeout timer starts on the server. Ideally, it should stop once the player has picked up the Quest and started playing again, but it does not. As we were testing on 3 Quests and only 1 person was testing, there were cases when a Quest would go to sleep. (And we had 15 s on the sleep timer settings in Quest)
The solution here is to not bring the Quest out of the guardian while playing and make sure that the sleep timer is set to max (4 hours).