Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event queue watcher and reducer #1162

Merged
merged 5 commits into from
Nov 5, 2024
Merged

Event queue watcher and reducer #1162

merged 5 commits into from
Nov 5, 2024

Conversation

udgover
Copy link
Collaborator

@udgover udgover commented Nov 5, 2024

This PR improves redis stability when there's no events / logs consumers running. As a matter of fact, when there's no consumers running, redis queue lists are growing infinitely and leads to OOM kill of the service.

To fix this issue, a watchdog has been added for each queue lists. It checks the length of the lists and trims them if greater than a configured value. The list will keep at least the most recent events based on the following configuration:

yeti_config.get("events", "max_queue_size", 30000)

yeti.conf.sample defines events.max_queue_size to 30000.

This PR also removes publish_log call from publish_event method.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was signed with the committer’s verified signature.
warsaw Barry Warsaw
Copy link
Collaborator

@tomchop tomchop left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@udgover udgover merged commit 00c0cf5 into main Nov 5, 2024
3 checks passed
@udgover udgover deleted the event_queue_watcher_reducer branch November 5, 2024 14:03
@tomchop tomchop added the core label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants