Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The timeout elapsed prior to obtaining a distributed lock (Redis) #2361

Open
MostafaSDesoky opened this issue Feb 7, 2024 · 0 comments
Open

Comments

@MostafaSDesoky
Copy link

Hello I've a problem and unfortunately I have no idea why
the error
I'm using Hangfire.Core 1.8.3
Hanfire.ASPNetCore 1.8.3
Hangfire.Redis.StackExchange 1.8.3
Timeout expired. The timeout elapsed prior to obtaining a distributed lock on the 'Failed to acquire lock on Tahrir_Hangfire_Prod_2lock:recurring-job:Auto Create within given timeout (00:00:15)' resource.

the full error in Event Viewer
hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs: Unhandled exception. Hangfire.Storage.DistributedLockTimeoutException: Timeout expired. The timeout elapsed prior to obtaining a distributed lock on the 'Failed to acquire lock on Tahrir_Hangfire_Prod_2lock:recurring-job:Auto Create within given timeout (00:00:15)' resource. at Hangfire.Redis.RedisLock.Acquire(IDatabase redis, RedisKey key, TimeSpan timeOut, TimeSpan holdDuration) at Hangfire.Redis.RedisLock.Acquire(IDatabase redis, RedisKey key, TimeSpan timeOut) at Hangfire.Redis.RedisConnection.AcquireDistributedLock(String resource, TimeSpan timeout) at Hangfire.RecurringJobExtensions.AcquireDistributedRecurringJobLock(IStorageConnection connection, String recurringJobId, TimeSpan timeout) at Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) at Hangfire.RecurringJob.AddOrUpdate(String recurringJobId, Expression1 methodCall, String cronExpression, RecurringJobOptions options)
at Hangfire.RecurringJob.AddOrUpdate(String recurringJobId, Expression1 methodCall, String cronExpression) at Tayar.API.Config.HangfireSetup.Seed(IConfiguration Configuration) at Tayar.API.Config.HangfireSetup.UseCustomConfig(IApplicationBuilder app, IConfiguration Configuration) at Program.

$(String[] args)

the real problem is it shutsdown the application
I've searched about timeout and what could be the problem didn't manage to get a good solution
thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant