AOSSIE-Org / AOSSIE-Org/DebateAI

Unbounded In-Memory State Accumulation leads to Performance: Memory Leak in Chat Storage

Open
#303 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
84
Forks
198
Avg merge
2d 19h
Merged PRs (30d)
30

Description

**Location**: `backend/controllers/debate_controller.go`

- **Issue**: The debateRooms map grows indefinitely. There is no mechanism to remove rooms from memory once a debate is finished or if they become inactive.

- **Fix**: Implement a cleanup routine (Ticker) or an LRU cache to delete old rooms. Alternatively, offload storage to Redis/DB and remove from memory.

- **Why**: The server will eventually crash with Out Of Memory (OOM) as traffic increases.

Video or screenshot : N/A logical changes

@bhavik-mangla Please checkout this fix

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.