Closed kevinperezbancoserfinanza closed 10 months ago
in .net core 2.1, 2.2 no occurs this error. Only in .net 6
I have the same issue, any other fix than migrating to SQL Server 2022 Express?
I am using it with .Net 7 and I don't have this problem, is there a way to see your source code? Thanks
Unfortunately I cannot share repository, since it is corporate software. I am only using AddOrUpdate scheduled tasks, which .Enqueue anither tasks.
I have 3 scheduled tasks
One will every minute Enqueue approx another 53.
And the other two run once a day at midnight.
It just sometimes happen and sometimes dont.
But all still seem working, maybe it should be warning and not error?
Okay, it originates from here. It seems the whole code in that file is not thread safe: https://github.com/raisedapp/Hangfire.Storage.SQLite/blob/32b31a525678efd0431845d3195217c02bda6fcc/src/main/Hangfire.Storage.SQLite/SQLiteDistributedLock.cs#L233
We are also having same problem, almost same situation, like one recurring job enquing multiple background jobs
We are using, Hangfire -1.7.32 Hangfire.Storage.SQLite - 0.3.3
Fixed it with version 0.4.0 of the library.
Category: Hangfire.Storage.SQLite.SQLiteDistributedLock EventId: 0
Unable to update heartbeat on the resource 'HangFire:job:1201:state-lock'. The resource is not locked or is locked by another owner.
Category: Hangfire.Storage.SQLite.SQLiteDistributedLock EventId: 0
Unable to update heartbeat on the resource 'HangFire:job:1199:state-lock'. The resource is not locked or is locked by another owner.
Category: Hangfire.Storage.SQLite.SQLiteDistributedLock EventId: 0
Unable to update heartbeat on the resource 'HangFire:job:1199:state-lock'. The resource is not locked or is locked by another owner.
How fix this error?