agents icon indicating copy to clipboard operation
agents copied to clipboard

when use job_executor_type=JobExecutorType.THREAD, the memory not drop when the room is disconnected

Open zhushixia opened this issue 1 year ago • 3 comments

worker_options = WorkerOptions( agent_name=AGENT_NAME, request_fnc=define_request_fnc, entrypoint_fnc=entrypoint, load_fnc=memory_only_load_function, job_executor_type=JobExecutorType.THREAD, load_threshold=0.9, port=8081 ) cli.run_app(worker_options)

Hello, I used job_executor_type=JobExecutorType.THREAD on ubuntu to create 1000 rooms(One agent per room) ,and the memory occupied by the worker process will not drop when the room is disconnected,can you help me, thanks

zhushixia avatar Dec 06 '24 11:12 zhushixia

And every time the room is closed, the memory usage does not decrease, but instead increases

zhushixia avatar Dec 08 '24 14:12 zhushixia

env: system: ubuntu 22.04 livekit agent: 0.11.1

zhushixia avatar Dec 09 '24 03:12 zhushixia

the same issue. but in my case, both THEAD and PROCESS cause memory leak in Ubuntu, and even the same Python(3.13.2) perform differently in different platform: in MacOS, everything is ok (python=3.13.2) in Ubuntu, memory always leak (pythoo=3.13.2)

theo1893 avatar Apr 28 '25 18:04 theo1893