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

RedisQues.checkQueues() called to often? #252

Open
mcweba opened this issue Feb 13, 2025 · 0 comments
Open

RedisQues.checkQueues() called to often? #252

mcweba opened this issue Feb 13, 2025 · 0 comments

Comments

@mcweba
Copy link
Collaborator

mcweba commented Feb 13, 2025

In the class RedisQues the method checkQueues() is called periodically to notify not active / not empty queues to be processed. This process gets heavier the more queues exist.

When having multiple instances of RedisQues deployed, it will be called even more.

See logs from one of our hosts. We have deployed 4 instances of RedisQues

2025-02-12 21:11:56,267 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:54,658 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,136 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,136 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,136 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,135 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,135 prod  crush INFO RedisQues - periodic queue check is triggered now
2025-02-12 21:11:51,132 prod  crush INFO RedisQues - periodic queue check is triggered now

You can see that the check is made multiple times almost at the same time.

@hiddenalpha you refactored this method some time ago to be more robust using UpperBoundParallel and PeriodicSkipScheduler. Maybe you could have another look to further improve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant