Number of googTracks under mediasoup-demo continues to increase when entering and exiting a room frequently

I opened the chrome browser under my windows computer, and did the following operations :

  • (1) Open a chrome new tab (marked as Tab1) with a link address such as
  • (2) Then, open another chrome tab (marked as Tab2) with the same link address
    Entering the same room atptze2k
  • (3) Close tab2, redo the above step (2), open another tab2
  • (4) Repeat the above two steps (2), (3)

Then I found the memory of tab1 continues to grow from 170m to 200m. After about 8 hours later, the consumed memory reached more than 600m. It is conceivable that if this operation continues, the memory will continue to grow.

Next, I opened chrome://webrtc-internal and clicked second address tab. And I found that when a peer entered the room it will increase two googTracks every time. But the googTracks will not release after peer exited the room. This maybe the cause of chrome memory leak.

Why did googTracks not be released when a peer exited the room in which mediasoup-client api such as consume.close() or (recv)transport.close() would be invoked? It’s annoying, please tell me how to solve this problem.

The reason for googTrack being added up, even after other person leaves the room, is that in this demo app the transport is not closed when user leaves the room, the previous googTracks are there just for history in webrtc-internals, if you refresh the webrtc-internals page they will disappear. So this is of no worry.

The transport is not being closed as single transport is being used to receive all the tracks from all users in the room, this seems intentional in demo app.

Lastly this is demo application, made just to show the overall working, there may be several issues in there. When you will have your real app you will not see things like these there.

I have not seen such memory related issues, so no worries from that perspective, you can go ahead and get mediasoup implemented in your app.