Skip to content

uniquejobs hash doesn't get cleaned up #195

@xjlu

Description

@xjlu

The versions we are using in one service is

gem 'sidekiq', '4.1.4'
gem 'sidekiq-unique-jobs', '4.0.18'

We use both until_executed and until_timeout. The uniquejob* keys are generated and cleaned up properly, but it leaves a copy of mapping inside the uniquejobs hash, and it keeps growing. This problem started exactly at 4.1.2 (we tested various version around that time). And it seems still a problem with the latest version 4.1.8.

The problem here is that the hash size grows to such an extent that it eventually fills up the redis memory. Normal metrics such as the number of keys don't help debug this issue.

The internal structure of the hash is

["0", [["e820b3a5db2bfe94ea686c10", "uniquejobs:2782395ef5070394f7d5bbf7a6c8b934"], ["1d51c1ce36fa7efda2356a07", "uniquejobs:1b8d30e357006dbf484fbec15d5ffab9"], ["79dc6c691669d857d561875a", "uniquejobs:629965e9a1a162901f6b22918d5ebcbb"], ["90531aeb90f014cb00f17349", "uniquejobs:1b8d30e357006dbf484fbec15d5ffab9"], ["9e6710a97fdfb3f5438477e4", "uniquejobs:1b8d30e357006dbf484fbec15d5ffab9"],
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions