-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
issue
I'm not sure if this is a bug, but it seems there is not only one person encountering memory leak issue.
The link above is the related post containing the problem description and lib version.
Here is what i found while debugging:
I have been debugging this for several days, and i found this issue seems to be related to livekit ffi lib. I see when a user try connecting to a livekit room, the requests below will be sent to ffi lib sequentially:
connect -> create_audio_track -> publish_track -> set_subscribed -> new_audio_stream -> ...
and i found the memory leak seems(i'm not sure) to happen after set_subscribed.
I hope the information above can help locate and resolving this problem, or i have to restart my agent server every several hours 😭
Updated: the memory leak also happens on my local machine (M1 MacOS 15.3.2) on different python versions(3.11.7 / 3.12.6 / 3.13.2), and this repo contains the dependencies and reproducing steps in details