I am using the default SQL Server storage for Hangfire. Since the rate of job creation per-day can be quite high (in the count of hundreds of thousands), the size of the database also grows quite fast.
Initially I thought it will still be fine because Succeeded jobs would be removed after one day. To my surprise, even after several days, the job is not yet removed from Hangfire.Jobs table.
When I ran this query on 30 July 2015:
select min(ExpireAt) from Hangfire.Job
where StateName = 'Succeeded'
I got 2015-07-21 13:28:27.543
, which is about 9 days ago.
I can manually delete the jobs myself or create a batch job that would periodically clean it up, but is there any scenario where the Succeeded job are still retained beyond their ExpireAt
?