node-sdks icon indicating copy to clipboard operation
node-sdks copied to clipboard

Memory leak on @livekit/rtc-node

Open us-asad opened this issue 8 months ago • 1 comments

Select which package(s) are affected

@livekit/rtc-node

Describe the bug

We discovered a memory leak with using: @livekit/rtc-node

What we tried to do:

  • connecting a new room in nodejs, waiting for 1.5min (90s), disconnecting
  • then again connecting a new room, waiting for 1.5min, disconnecting
  • then again same process....

overtime we see an increasing memory usage.

this is all we deployed to google cloud run: https://github.com/us-asad/livekit-only-connect-w-settimeout-gcp/blob/main/src/index.ts

Image

System Info

Google Cloud Run with 512Mib & 1 CPU

us-asad avatar Aug 03 '25 07:08 us-asad

@yepher @sascotto need your attention please

us-asad avatar Aug 04 '25 18:08 us-asad