Hangfire.Mongo.DistributedLock.MongoDistributedLockException: Could not release a lock on the resource 'HangFire:locks:schedulepoller'
See original GitHub issueHi, I got this error using Hangfire.Mongo drive.
Environment:
- Win. Server 2012;
- 3 nodes of MongoDB with replication set;
- Hangfire.Pro: 1.4.7.0;
- Hangfire.Core: 1.6.8.0;
- Hangfire.Mongo: 0.3.2.201;
1000 jobs are executed every 15 min and 7 jobs at a time.
Message: Hangfire.Mongo.DistributedLock.MongoDistributedLockException: Could not release a lock on the resource ‘HangFire:locks:schedulepoller’: Check inner exception for details. System.UnauthorizedAccessException: Access to the path is denied.
Exception:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Threading.EventWaitHandle.OpenExistingWorker(String name, EventWaitHandleRights rights, EventWaitHandle& result)
at Hangfire.Mongo.DistributedLock.MongoDistributedLock.Release()
--- End of inner exception stack trace ---
at Hangfire.Mongo.DistributedLock.MongoDistributedLock.Release()
at Hangfire.Mongo.DistributedLock.MongoDistributedLock.Dispose()
at Hangfire.Server.DelayedJobScheduler.EnqueueNextScheduledJob(BackgroundProcessContext context)
at Hangfire.Server.DelayedJobScheduler.Execute(BackgroundProcessContext context)
at Hangfire.Server.AutomaticRetryProcess.Execute(BackgroundProcessContext context)
I think the error happens in this line: https://github.com/sergeyzwezdin/Hangfire.Mongo/blob/master/src/Hangfire.Mongo/DistributedLock/MongoDistributedLock.cs#L209
Someone had the same problem? Is there any solution for this?
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Hangfire.Mongo.DistributedLock ...
MongoDistributedLockException: Could not release a lock on the resource 'HangFire:locks:schedulepoller': Check inner exception for details.
Read more >Lock timeout problems! - question
Started seeing a lot of errors on my staging deployment. Could not place a lock on the resource 'HangFire:locks:schedulepoller' and ...
Read more >Getting Hangfire to use MongoDB Storage
I've verified the database exists and the above connection string is correct. I get this exception: Unable to clean up locks on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In Hangfire configuration:
In Mongo settings:
@gottscj The errors I pasted above got solved after configuring more properties on the mongo repository client and the C# driver. Thanks for help!