Master connection showing "Disconnected from signal channel" after 10 minutes?
webdesigner97 opened this issue · 8 comments
Hi, I am developing a video conferencing application using this SDK. But I the master connection is getting closed after 10 minutes. Same has been noted in the KVS WebRTC Test Page as well. I want the master to be able to wait for SDP offer from viewers for required period of time(atleast 1-2 hours). Is there a way to extend the connection duration from 10 minutes
Below is the log:
[2023-02-24T12:03:38.839Z] [INFO] [MASTER] Starting master connection
[2023-02-24T12:03:39.836Z] [INFO] [MASTER] Connected to signaling service
[2023-02-24T12:13:39.943Z] [INFO] [MASTER] Disconnected from signaling channel
Hi @webdesigner97, can you please share the version of the master SDK that you are using? Have you been able to reproduce this with the sample application? If yes, can you please share the steps?
Thanks @niyatim23 for the reply. Please note the below details.
SDK version used to run from local machine : 2.0.1 and 2.0.2
The issue is also reproducible in the sample application from here .
Steps to reproduce the issue.
- Take the KVS WebRTC Test Page or run the sdk example code from the local machine
- Join the session/call as master.
- Wait for 10-15 minutes, and below line will be logged and master connection get disconnected from the signalling channel
[2023-02-24T12:13:39.943Z] [INFO] [MASTER] Disconnected from signalling channel - After the this error is logged when we try to connect as viewer from another browser tab, it will fails to establish the connection as master already exited from the channel.
Please let me know if you need any help on reproducing the issue.
I also noticed the same issue using the version 2.0.2.
What makes it worse, when automatically reconnecting as master to the signaling channel, the SignalingClient.websocket says it is connected (readyState 1), but it does not receive any messages from the signaling channel. This means that no ice candidates or sdp offers arrive at the master, which breaks webrtc connectivity from the viewers.
In the aws documentation it says that the latest master request overwrites the earlier ones, but either that is not the case, or something is broken in the websocket.
@webdesigner97, for those 10-15 min, is any viewer connected to the master?
@niyatim23 Yes. with and without any viewer connected to the signalling channel, the issue will occur. I think the idle time for signalling channel connection from master is 10 minutes by default. So i need a way to increase the idle time.
Hi @webdesigner97,
Unfortunately, there is a hard limit of 10 minutes of idle time.
See also awslabs/amazon-kinesis-video-streams-webrtc-sdk-c#524 and #83
There are a few options:
- Send a Websocket ping message. https://repost.aws/questions/QUV-egTr6_Skylz2_OHp8irw/websocket-api-server-side-ping-pong. Sending a ping message doesn't seem to be supported by browsers at the moment.
- Reopen the websocket whenever it closes due to inactivity.
signalingClient.on('close', () => {
signalingClient.open();
});