Closed pmcfernandes closed 5 years ago
ArgumentException: Um item com a mesma chave já foi adicionado.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) +12998942 System.Linq.Enumerable.ToDictionary(IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) +247 Hangfire.MemoryStorage.MemoryStorageConnection.GetAllEntriesFromHash(String key) +260 Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) +244 Hangfire.RecurringJobManagerExtensions.AddOrUpdate(IRecurringJobManager manager, String recurringJobId, Job job, String cronExpression, TimeZoneInfo timeZone, String queue) +107 Hangfire.RecurringJob.AddOrUpdate(Expression1 methodCall, String cronExpression, TimeZoneInfo timeZone, String queue) +165
2.Insert(TKey key, TValue value, Boolean add) +12998942 System.Linq.Enumerable.ToDictionary(IEnumerable
2 keySelector, Func
1 comparer) +247 Hangfire.MemoryStorage.MemoryStorageConnection.GetAllEntriesFromHash(String key) +260 Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) +244 Hangfire.RecurringJobManagerExtensions.AddOrUpdate(IRecurringJobManager manager, String recurringJobId, Job job, String cronExpression, TimeZoneInfo timeZone, String queue) +107 Hangfire.RecurringJob.AddOrUpdate(Expression
The AddOrUpdate method is not thread safe. You have a race condition somewhere. Add locks around it.
ArgumentException: Um item com a mesma chave já foi adicionado.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52 System.Collections.Generic.Dictionary
2.Insert(TKey key, TValue value, Boolean add) +12998942 System.Linq.Enumerable.ToDictionary(IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) +247 Hangfire.MemoryStorage.MemoryStorageConnection.GetAllEntriesFromHash(String key) +260 Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) +244 Hangfire.RecurringJobManagerExtensions.AddOrUpdate(IRecurringJobManager manager, String recurringJobId, Job job, String cronExpression, TimeZoneInfo timeZone, String queue) +107 Hangfire.RecurringJob.AddOrUpdate(Expression
1 methodCall, String cronExpression, TimeZoneInfo timeZone, String queue) +165