Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Reduce limit of buffered messages from 1GB to 600 MB #7264

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

achim-k
Copy link
Contributor

@achim-k achim-k commented Dec 19, 2023

User-Facing Changes
Reduce limit of buffered messages to mitigate OOM crashes

Description
This PR reduces the limit of buffered messages from 1GB to 600 MB. Previously, with the cache size for preloaded and buffered messages both being limited to 1GB, the app could go well beyond the 2GB JS heap limit at which the app eventually gets killed by the browser (or electron). By reducing the cache size of buffered messages, we make these OOM crashes less likely. The downside of this approach is that less messages can be buffered which can be noticed mainly by the amount of messages buffered behind the current playback cursor.

Copy link
Contributor

@defunctzombie defunctzombie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its worth adding some shorter version of your PR description as a code comment above the change maxTotalSizeBytes variable so we can remember some justification on 600MB.

I am 👍 to this change in the short term to allow us time to explore better caching strategies - primarily for streaming data where we want to avoid re-fetching if we can.

@achim-k achim-k merged commit 96efb60 into main Dec 19, 2023
14 checks passed
@achim-k achim-k deleted the achim/reduce-buffered-msg-limit branch December 19, 2023 16:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants