Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Add option to skip storing job args in status key #155

Description

@ezekg

I recently ran some diagnostics against my Sidekiq instance using RedisInsight and was shocked to see I had >1GB of data for the sidekiq:status:* keyspace. This is 10x larger than any other keyspace in my Redis database. Worth noting that I process ~1MM jobs a day that utilize sidekiq-status, and I have a status expiry of 3 days.

Upon inspection, the large keyspace was because this lib is storing the job's args for display purposes. In my case, this included potentially large JSON payloads.

I actually don't use the UI for Sidekiq, so this was needlessly wasting space and I feel like an option to disable this behavior would be beneficial for situations like this.

For now, I implemented the following monkey-patch in an initializer:

class Sidekiq::Status::ClientMiddleware
  def display_args(msg, queue)
    nil
  end
end

Thoughts?

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