Unity-Technologies / UnityRenderStreaming

Streaming server for Unity
Other
1.27k stars 347 forks source link

[BUG]: Stream freezes after 2-5 minutes - Bidirectional sample #973

Open tsvetan-vr opened 6 months ago

tsvetan-vr commented 6 months ago

Package version

3.1.0-exp.7

Environment

* OS: iOS, Android, MacOS
* Unity version: Unity 2022.3, Unity 2023.1
* Graphics API:
* Browser: Safari, Chrome

The webserver is running on Linux (Debian 11)

Steps To Reproduce

  1. Download the sample Render Streaming WebApp
  2. Setup on Linux and start it with https (and private)
  3. Open Bidirectional sample - peer 1 (Windows PC Chrome), peer 2 (iPhone Safari)
  4. Enter the same connection id and make a connection
  5. Wait 2-5 minutes and the connection freezes

Current Behavior

After 2-5 minutes upon making a connection between the two peers, the stream freezes.

Expected Behavior

The connection should stay after 5 minutes as long as it needs to stay alive.

Anything else?

Additional information about the issue:

Thank you!

tsvetan-vr commented 5 months ago

It turns out the websocket disconnects after timeout (the default is 300s) if it's not used. For our use case we fixed it by sending keep alive messages from the web client.