mirror of https://github.com/langgenius/dify.git
fix: release graph_runtime_state reference to prevent memory leak
Release the _graph_runtime_state reference in stop_listen() to allow Python GC to reclaim memory immediately after request completion. Without this fix, the reference chain: AppQueueManager._graph_runtime_state -> GraphRuntimeState -> Graph -> Node -> graph_runtime_state prevents garbage collection until the entire pipeline object is released, causing memory to accumulate under high concurrency. Fixes #30183 Signed-off-by: SherlockShemol <shemol@163.com>
This commit is contained in:
parent
c393d7a2dc
commit
db5462b2ba
|
|
@ -90,6 +90,7 @@ class AppQueueManager:
|
|||
"""
|
||||
self._clear_task_belong_cache()
|
||||
self._q.put(None)
|
||||
self._graph_runtime_state = None # Release reference to allow GC to reclaim memory
|
||||
|
||||
def _clear_task_belong_cache(self) -> None:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue