owt-client-javascript icon indicating copy to clipboard operation
owt-client-javascript copied to clipboard

Error: Can't create so many peer connections

Open kurapatijayaram opened this issue 4 years ago • 12 comments

Hi , We are unsubscribing the subscribed streams properly, even though we are facing the above mentioned error, from then we are unable to subscribe to the new streams.

Can anyone help me on this.

Thank you.

kurapatijayaram avatar Sep 03 '20 02:09 kurapatijayaram

Hi,

There is a limit on the number of PeerConnections can be created. It might be 500 for Chrome if I remember it correctly. But a PeerConnection object may not be released immediately by GC when it's no longer needed, see https://bugs.chromium.org/p/chromium/issues/detail?id=825576 for detailed information. Please check your application to see if you really need so many connections. Thanks.

jianjunz avatar Sep 04 '20 02:09 jianjunz

Hi @jianjunz , Thanks for the reply. Recently we tried active voice detection(AVD), for that whenever new stream id is triggered we are subscribing to the stream and unsubscribing the previous one, this process is creating the above mentioned errors. Not only for AVD, if many calls were handled in the same tab also we are facing this issue. What will be the solution to this problem.

Thank you.

kurapatijayaram avatar Sep 04 '20 08:09 kurapatijayaram

Hi @jianjunz , Please reply .

Thank you.

kurapatijayaram avatar Sep 08 '20 11:09 kurapatijayaram

Hi,

Perhaps you could mute the inactive subscriptions, and unmute them when they're active again. Just FYI, OWT is going to support multiple publications/subscription on a single PeerConnection. That would be the solution for your issue.

jianjunz avatar Sep 09 '20 08:09 jianjunz

Hi @jianjunz , Thanks for the reply. We are doing the same, when ever stream is required we are subscribing and unsubscribing when it is not required. When can we expect multiple publications/subscriptions on single PeerConnection ?

Thanks.

kurapatijayaram avatar Sep 09 '20 14:09 kurapatijayaram

I'm afraid I don't have an ETA at this time.

jianjunz avatar Sep 09 '20 15:09 jianjunz

Hi,

There is a limit on the number of PeerConnections can be created. It might be 500 for Chrome if I remember it correctly. But a PeerConnection object may not be released immediately by GC when it's no longer needed, see https://bugs.chromium.org/p/chromium/issues/detail?id=825576 for detailed information. Please check your application to see if you really need so many connections. Thanks.

Is this limitation is mix also?

Alex-YddeR avatar Oct 06 '20 10:10 Alex-YddeR

A PeerConnection for a publication or a subscription at this time, no matter it subscribes a mixed stream or a forward stream.

jianjunz avatar Oct 06 '20 16:10 jianjunz

I believe you guys working on SPC, does this also improves the CPU usage on client side. since currently the cpu usage is so high for the conference room with more than 10 participants.

Thanks

Alex-YddeR avatar Dec 25 '20 03:12 Alex-YddeR

Hi @jianjunz , Is there any update on multiple publications/subscriptions on single PeerConnection ? as v5 has QUIC protocol enabled.

Thank you.

kurapatijayaram avatar Jun 18 '21 12:06 kurapatijayaram

Multiple publications/subscriptions on a single PeerConnection is supported since 5.0. Please see change log here. It's not related to QUIC.

jianjunz avatar Jun 18 '21 15:06 jianjunz

Hi @jianjunz , Thank you so much for the reply. Is there any example for this ?

Thank you.

kurapatijayaram avatar Jun 18 '21 15:06 kurapatijayaram