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

Leaked keys in version 5.0.10 #519

Closed
alisherry opened this issue Jun 18, 2020 · 1 comment
Closed

Leaked keys in version 5.0.10 #519

alisherry opened this issue Jun 18, 2020 · 1 comment

Comments

@alisherry
Copy link

Describe the bug
Our app is currently on version 5.0.10 of the gem, and we're currently in the process of removing it. We've attempted to upgrade to the latest version, but that caused infrastructure issues during deployment so we had to revert that.

We recently noticed that in our redis, there's a very large amount of keys in the uniquejobs hash. The current size is in the hundreds of millions, taking up almost 8GB of our Redis storage space. Those keys aren't used as the actual sidekiq queues are empty, and those locks should have been released.

We've removed the uniqueness locks in that particular redis so we aren't dependant on locks anymore, but now comes in the issue of deleting them.

One solution we're exploring is to set that hash to expire in a small period of time

 Redis.current.with do |conn|
      conn.expire("uniquejobs", 5.seconds)
 end

As mentioned above, we've previously tried bumping to 6.0.21 but we saw a massive CPU spike and had to revert. Outside of upgrading the gem, is that a viable solution to remove those keys (if we're not concerned about the uniqueness from those keys)

@alisherry
Copy link
Author

Update to this conn.unlink was the solution I ended up going with and it cleared the keys without any other errors. Closing this issue

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

1 participant