Open mkamranaslam opened 4 years ago
Hi, We have exact same issue it started after updating to 1.7.19 version. Hangfire is hosted in Azure App Service using 2 instances. Jobs are stuck in the queue due retry logic of 10 times followed by exception: Cannot insert duplicate key row in object 'HangFireProd.Counter' with unique index 'CX_HangFire_Counter'. The duplicate key value is (stats:succeeded).
CX_HangFire_Counter index shouldn't be unique, so please roll back the changes and make it non-unique back. If you was trying to solve the replication problem on SQL Azure, please use the solution from this thread instead.
We've done this change it works now! We'll do a full schema comparison to get scope what we are missing. Probably we haven't executed migration scripts during version upgrade.
I was using a single deployment/server previously, Now aster shifting to an IIS Cluster with three servers, getting this exception a lot, jobs are not completing.
Violation of PRIMARY KEY constraint 'PK_Counter'. Cannot insert duplicate key in object 'HangFire.Counter'. The duplicate key value is (stats: succeeded).
Using: hangfire 1.7.9