Hangfire.state Cleanup


I have encountered a problem where hangfire.state reached max records.
At the moment I resolved this by changing from int to bigint.
I would like to know if there is a safe way to clean up hangfire records as the database keeps getting larger.


1 Like

I’m not sure why Hangfire doesn’t use bigint by default. Any enterprise use of background jobs is quickly going to use up an int for PK.

I suppose you could always wipe and rebuild/reseed the Hangfire tables periodically, but that would have to be done with no pending jobs in the queues.