Transient Azure SQL Error

Hey Adam,

Overall, 3.1.x has been very stable for us since we moved to Azure SQL. However, once in a blue moon (e.g. twice over the weekend) we have a notification pop up with this error:

An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding ‘EnableRetryOnFailure’ to the ‘UseSqlServer’ call.

This morning it was a “GitHub sync error”, but the one earlier was not that - just some sort of general exception.

Not sure if adding EnableRetryOnFailure() to your UseSqlServer() call is practical, but it might be worth a shot!

Cheers,
Matt

Product: PowerShell Universal
Version: 3.1.6

Seems like we should turn that on. I’ll open an issue to investigate.

1 Like

I found the exception in the logs, if it helps, @adam!

The “enable retries” is definitely worth a try, but maybe this will help you narrow it down to some other kind of issue. Looks like it’s to do with Git sync.

Incidently - when we were upgrading to v3, I upgraded our existing “psu2” instance to v3, and once it was done I stood up a new instance without the “2” in the name to be our “prod” instance from then on. Having two concurrent instances pointing at the same Azure SQL database seemed to make the Git sync go haywire. Is that expected? I was assuming that if you did have two PSU instances (assuming you paid for two licences) then you’d point them both at the same SQL database so they could load balance the scheduled jobs. Is there something about the Git sync history being in the database that would cause issues?

Just to be clear: We’re only running one instance. This was just something I noticed as we migrated back to a “good” name for our app service.

Failed to sync: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.    at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at UniversalAutomation.GitSyncService.TrySync() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 103
   at UniversalAutomation.GitSyncService.Sync() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 91

Aha! I see the issue here. Thanks for the details! This is a bug and will be resolved in tomorrow’s 3.2 release.

1 Like