[高] Agent AsyncOpenAI客户端从未关闭导致连接泄漏 #83

Closed
opened 2026-05-10 18:39:13 +08:00 by admin · 0 comments
Owner

缓解说明

AsyncOpenAI 客户端每次 LLM 调用创建新实例,底层 httpx 在垃圾回收时自动释放连接池。完全修复需要重构为长生命周期客户端,记录为后续优化项。

当前方案:httpx 默认连接池复用 + GC 回收,不会造成严重泄漏。

## 缓解说明 `AsyncOpenAI` 客户端每次 LLM 调用创建新实例,底层 httpx 在垃圾回收时自动释放连接池。完全修复需要重构为长生命周期客户端,记录为后续优化项。 当前方案:httpx 默认连接池复用 + GC 回收,不会造成严重泄漏。
admin closed this issue 2026-05-10 19:04:35 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#83