Skip to content

Transaction was discarded to prevent inconsistency: one or more of active distributed locks were abandoned. Are you hitting Redis memory limits? #98

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

Open
c5racing opened this issue May 7, 2020 · 0 comments

Comments

@c5racing
Copy link

c5racing commented May 7, 2020

While using the progressbar per the example implementaion, we seeing Redis errors:

public void TaskMethod(PerformContext context)
{
    var bar = context.WriteProgressBar();
    
    foreach (var item in collection.WithProgress(bar))
    {
        // do work
    }
}

System.InvalidOperationException: Transaction was discarded to prevent inconsistency: one or more of active distributed locks were abandoned. Are you hitting Redis memory limits?
at Hangfire.Pro.Redis.RedisConnection.ExecuteTransaction(ITransaction transaction, CommandFlags flags)
at Hangfire.Pro.Redis.RedisTransaction.Commit()
at Hangfire.Console.Storage.ConsoleStorage.AddLine(ConsoleId consoleId, ConsoleLine line)
at Hangfire.Console.Server.ConsoleContext.AddLine(ConsoleLine line)
at Hangfire.Console.Progress.DefaultProgressBar.SetValue(Double value)
at Hangfire.Console.Progress.ProgressEnumerable`1.Enumerator.MoveNext()

We've validated there are no redis issues and these occurs didn't crop up until starting to use the StatusBar. Could there be issues when the foreach is too fast? Each of our ForEach loops has about 1000 objects in them.

image

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

No branches or pull requests

1 participant