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

watchStuckJobs uses the KEYS command #1075

Open
andrehp opened this issue Jun 13, 2017 · 3 comments
Open

watchStuckJobs uses the KEYS command #1075

andrehp opened this issue Jun 13, 2017 · 3 comments

Comments

@andrehp
Copy link

andrehp commented Jun 13, 2017

Hello,

While debugging some performance issues I looked at the watchStuckJobs implementation and saw kue uses the KEYS redis command. Redis recommends that this command should be avoided in production environment due to its complexity (O(n) on the number of keys). https://redis.io/commands/keys

Could you fix this? Or at least stop strongly suggesting using this command? The performance impact is significant with a big enough database.

Regards

@behrad
Copy link
Collaborator

behrad commented Jun 23, 2017

watchStuckJobs is actually an old workaround method which will be dropped later.
However you can create a PR if you want :)

@itamarhaber
Copy link

The use of KEYS in a production environment is one of the biggest no-nos in Redis. I'm happy to hear this is no longer needed, but it has to be deprecated asap. Users are actually calling this "workaround" and are experiencing performance issues with their servers.

@taywrobel
Copy link

taywrobel commented Apr 22, 2018

I just got bit by this in prod.

Opened #1174 which should fix it.

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

No branches or pull requests

4 participants