We have a never ending job that subscribes to a feed and then do some processing in the HF job. The job is tagged with DisableConcurrentExecution
and timeout is set to 1 h. The job is running in Azure with SQL server storage.
We get a lot of Hangfire.Storage.DistributedLockTimeoutException
.
Any suggestions of how to handle this?
[DisableConcurrentExecution(3600)]
public class MyJob
{
public void Execute(IJobCancellationToken cancellationToken)
{
//never ending job
}
}
Hangfire.Storage.DistributedLockTimeoutException:
at Hangfire.SqlServer.SqlServerDistributedLock.Acquire (Hangfire.SqlServer, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null)
at Hangfire.SqlServer.SqlServerDistributedLock..ctor (Hangfire.SqlServer, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null)
at Hangfire.SqlServer.SqlServerConnection.AcquireDistributedLock (Hangfire.SqlServer, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null)
at Hangfire.DisableConcurrentExecutionAttribute.OnPerforming (Hangfire.Core, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null)
at Hangfire.Server.BackgroundJobPerformer.InvokePerformFilter (Hangfire.Core, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null)
Version: HF 1.5.3