-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
High volume of drained events -- xtrim can't keep up #69
Comments
On the latest versions at least, the drained event is only emitted when a job is completed and there are no other jobs to fetch in the queue (delayed jobs will not be taken into consideration though). So an scenario were a lot of drained events are generated would be if jobs are coming in much slower than the workers process them such that every-time a job is processed the next job in the queue has not been added yet. |
we're on 6.4.0 I did see a similar comment re: changing the drain event logic. Confirm bumping to |
One other symptom I forgot to mention -- we also noticed an elevated amount of |
@chrisvlopez never heard about elevated number of GET commands before, I would need a bit more context in order to be able to give an assessment. |
Hi,
We've experienced an issue where our redis instance was backed up with a large number of drained events (O(millions)).
The
streams.events.maxLen
bit was not changed and I confirmed it was defaulting to 10K on redis itself. From testing locally, I think the root cause to be the redisxtrim
command used to trim the events, specifically that there's a default limit on the number of events that will be trimmed:Meaning, we were likely generating too many
drain
events for the trim event commands to keep up. A direct fix could involve:which at least functionally works from my local testing (ignoring perf implications).
But there is an underlying question of whether we should be generating so many
drain
events in the first place. We have ~100 workers which I assume are each generating its owndrain
event that is causing the build up. Is there some setting we should be tuning to reduce the amount of event creation? Is increasingdrainDelay
the only option I have?Thanks!
The text was updated successfully, but these errors were encountered: