Set AutomaticRetry to zero but the job was retried automatically

Hi there,

We use [AutomaticRetry(Attempts = 0)] and [DisableConcurrentExecution(timeoutInSeconds: 1800)] in our job because we don’t expect that a job will be requeued.
But, the job was retried 10 times and it might cause by unstable Redis connection (Azure).
Also, I am wondering why a job ID was processed by a WorkerId and hand over to another new WorkderId ?

Any ideas or thoughts will be appreciated.

An error from Application Insights

Timeout expired. The timeout elapsed prior to obtaining a distributed lock on the ‘Failed to acquire lock on hangfire:production:WriteJob.Perform within given timeout (00:30:00)’ resource.

Hangfire.Storage.DistributedLockTimeoutException:
at Hangfire.Redis.RedisLock.Acquire (Hangfire.Redis.StackExchange, Version=1.8.6.0, Culture=neutral, PublicKeyToken=null)

Library version

Hangfire.AspNetCore: 1.7.32
Hangfire.Core: 1.7.32
Hangfire.Redis.StackExchange: 1.8.6

Seems like a workable solution is to specify FetchNextJobTimeout or InvisibilityTimeout.
Because our job may run over 5 hours.