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
Is there a way to add retry policy for transient failures in database operations? #733
Comments
Hey! That's also our problem. When using Azure SQL there might be transient errors where a simple retry would help... |
I have been seeing similar issues using AzureSql. I have taken a look at
public virtual bool IsTransient(Exception ex)
{
return false;
}
try{
// For all cmd.XXX calls
cmd.ExecuteNonQueryAsync()
}
catch(Exception ex)
{
if(IsTransient(ex))
{
// Retry up to X.
}
}
public override bool IsTransient(Exception ex)
{
// Some logic here.
return true;
} |
Hello ! |
I run it in cluster mode even though only a single node exists. For my particular situation the timing of the event doesn't have to be perfect, just as long as it runs in a sensible time period. |
I've been circling around these reports about transient errors and there's already retries in place based on this logic here. The retry should be done for operations which could cause the scheduler to go into bad state, other operations usually can safely be retried later on. |
I don't think |
@puddlewitt you are indeed correct that the logic won't take action here. I've opened an issue on Java side to discuss what is the correct action as there is a logic fault as far as I understand. The retry-logic should come from JobStoreSupport level where transaction is retried on error. |
We are running our clustered jobs scheduler in Azure. It is common that a database connection is interrupted from time to time or SQL command fails due to transient network failure.
Is there a way to configure a retry policy so that for example, when trigger state is update fails the a retry policy is immediately applied.
I am investigating for a way how to avoid restarting a scheduler.
Thank you!
The text was updated successfully, but these errors were encountered: