Skip to content

How to safely clean jobqueue table #407

@AlexanderSysoev

Description

@AlexanderSysoev

Hi!

We are using Hangfire with PostgreSQL (version 1.20.9). Recently, I’ve noticed that the largest table in the hangfire schema is jobqueue (currently containing 3.5 million records, with a size of nearly 1 GB). Additionally, I’ve observed that a lot of queries are directed towards this particular table.

When executing the SQL query SELECT * FROM hangfire.jobqueue ORDER BY fetchedat ASC, it returns quite old records, and I’m not certain that this data is necessary for my application.

Image

Is there a safe method to clean up this table and maintain its size at a reasonable level?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions