Open Preferred-Mutual-Insurance-Company opened 2 years ago
Thank you to anyone who at least looked at this issue. I believe I've discovered the problem. Here are a few articles on the issue:
I think we'll look to try disabling IDENTITY_CACHE at the database level. Unfortunately other objects exist in this database besides hangfire so they'll be affected by the setting. The last article mentions using a SEQUENCE instead of an auto-increment. Perhaps that might be a consideration in a future version (they've been supported since SQL 2012) so that we could target just the hangfire tables.
I'll report back on the outcome.
Background
Once a month we patch our servers. When the SQL Server that hangfire is using becomes unavailable I’ll see errors like:
Eventually followed by:
The system seems to recover fine but my concern is that the Job IDs seem to jump dramatically, about 10k.
28668 → 38640 in one environment![image](https://user-images.githubusercontent.com/6492548/151581364-fec11c60-8e0b-4ae4-8dc8-479b6282d8d7.png)
31242 → 41211 in another environment![image](https://user-images.githubusercontent.com/6492548/151581057-98275200-a4a6-4b13-bf6f-aa7ccd56a91f.png)
My questions are:
What causes this jump?
Aside from shutting down the background job processor during patching, is there something I can do to prevent this?
Thank you kindly for any and all feedback.
Technical Details
Packages Used:
Setup:
Configuration (roughly):