Skip to content

fix: cap terminal entries at 1000 to prevent unbounded memory growth - #1743

Open
praneshnikhar wants to merge 1 commit into
foss42:mainfrom
praneshnikhar:fix-terminal-unbounded-entries
Open

fix: cap terminal entries at 1000 to prevent unbounded memory growth#1743
praneshnikhar wants to merge 1 commit into
foss42:mainfrom
praneshnikhar:fix-terminal-unbounded-entries

Conversation

@praneshnikhar

Copy link
Copy Markdown

Description

The TerminalController.append method prepended new entries to the list but never removed old ones. During long sessions with streaming responses, this could accumulate thousands of entries, degrading performance and increasing memory pressure.

Added a _maxEntries limit of 1000, removing excess entries from the end of the list (oldest entries) when the limit is exceeded.

Fixes #1648

Change type

/kind bug

The TerminalController.append method prepended new entries to the list
but never removed old ones. During long sessions with streaming responses,
this could accumulate thousands of entries, degrading performance and
increasing memory pressure.

Added a _maxEntries limit of 1000, removing excess entries from the end
of the list (oldest entries) when the limit is exceeded.

Fixes foss42#1648

Signed-off-by: praneshnikhar <praneshnikhar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Terminal entries grow unbounded causing memory leak

1 participant