fix(bridge): resolve websocket zombie connection and bounding memory leaks

This commit is contained in:
Variet Worker
2026-03-23 21:11:52 +09:00
parent e21f71baf8
commit ecebec3906
10 changed files with 110 additions and 25 deletions

View File

@@ -0,0 +1,12 @@
# WebSocket 좀비 커넥션 해결 및 통신망 메모리 누수 구조 패치
- **시간**: 2026-03-23 21:09~21:20
- **Commit**: TBD
- **Vikunja**: #510 → done
## 결정 사항
- **ws-client.ts 핑퐁 와치독(Ping-Pong Watchdog)**: 단순 에러 캐치가 아니라 `ws.terminate()`를 통해 무반응 소켓을 강제 종료하여 자체 재연결 로직(`_onDisconnect`)을 활성화하도록 설계.
- **통신망 추적 변수 캡핑(Bounded Cap)**: `hub.py``pending_owners``bot.py``_sent_approval_ids` 등 무한히 쌓일 수 있는 파이썬 딕셔너리에 LRU(오래된 순 삭제) 로직을 추가. 비록 당장 OOM을 유발하진 않지만 이 구조적 메모리 누수(Leak)를 원천적으로 차단하여 시스템 안정성을 극대화함.
## 미완료
- 없음