Encountered boot error where umbraco could not check upgrade state on production azure app
I had a production environment go down to the following error.
Umbraco.Core.Exceptions.BootFailedException: Could not check the upgrade state.
at Umbraco.Core.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 264
at Umbraco.Core.RuntimeState.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 171
at Umbraco.Core.Runtime.CoreRuntime.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, IProfilingLogger profilingLogger) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 375
at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 176
Umbraco.Core.Exceptions.BootFailedException: Could not check the upgrade state.
at Umbraco.Core.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 264
at Umbraco.Core.RuntimeState.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 171
at Umbraco.Core.Runtime.CoreRuntime.DetermineRuntimeLevel(IUmbracoDatabaseFactory databaseFactory, IProfilingLogger profilingLogger) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 375
at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 176
-> System.InvalidOperationException: Internal .Net Framework Data Provider error 6.
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Umbraco.Core.Persistence.DbConnectionExtensions.IsAvailable(IDbConnection connection) in D:\a\1\s\src\Umbraco.Core\Persistence\DbConnectionExtensions.cs:line 54
at Umbraco.Core.Persistence.DbConnectionExtensions.IsConnectionAvailable(String connectionString, String providerName) in D:\a\1\s\src\Umbraco.Core\Persistence\DbConnectionExtensions.cs:line 46
at Umbraco.Core.Persistence.UmbracoDatabaseFactory.get_CanConnect() in D:\a\1\s\src\Umbraco.Core\Persistence\UmbracoDatabaseFactory.cs:line 130
at Umbraco.Core.RuntimeState.TryDbConnect(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 276
at Umbraco.Core.RuntimeState.GetUmbracoDatabaseState(IUmbracoDatabaseFactory databaseFactory) in D:\a\1\s\src\Umbraco.Core\RuntimeState.cs:line 236
No code changes were pushed recently and I didn't see any errors in the logs that would have led to this issue. Could very well be a problem on the azure side and not umbraco. Fortunately, I was able to resolve it by restarting the server, but I would appreciate any suggestions on how I can avoid this issue in the future.
But I'm not sure whether this is a one off, or likely to return, and if there is anything extra in application insights/logs around the time of the outtage, eg did a web app, or something failover during this period?
But basically during your app start, 'for some reason', possibly transient, the site couldn't connect to the SQL Azure DB, restarting meant either the transient issue had passed or cleared any connections to the db...
It's running umbraco 8.12.2 right now, though it was upgraded from 8.2.2 a few months ago. The site was missing the SQLMainDomLock setting, so adding that will probably help. Thanks for pointing that out. Overlooked that piece when reviewing the work of the developer that handled the upgrade.
Encountered boot error where umbraco could not check upgrade state on production azure app
I had a production environment go down to the following error.
No code changes were pushed recently and I didn't see any errors in the logs that would have led to this issue. Could very well be a problem on the azure side and not umbraco. Fortunately, I was able to resolve it by restarting the server, but I would appreciate any suggestions on how I can avoid this issue in the future.
Hi Jesse
Which version of Umbraco 8 is this?
The error that seems to be the cause of this in your stack is:
System.InvalidOperationException: Internal .Net Framework Data Provider error 6.
which 'I think' maybe a transient error with SQL Azure connections eg
https://stackoverflow.com/questions/42027191/internal-net-framework-data-provider-error-6-in-sql-azure
https://social.technet.microsoft.com/Forums/azure/en-US/2904775b-8624-4934-a229-30c40a3a9081/intermittent-quotinternal-net-framework-data-provider-error-6quot?forum=ssdsgetstarted
But I'm not sure whether this is a one off, or likely to return, and if there is anything extra in application insights/logs around the time of the outtage, eg did a web app, or something failover during this period?
The reason I ask which version is that in some earlier versions of V8, you have to have a very specific configuration to work on an Azure Web App - https://our.umbraco.com/documentation/getting-started/setup/server-setup/azure-web-apps regarding the SQLMainDomLock ...
But basically during your app start, 'for some reason', possibly transient, the site couldn't connect to the SQL Azure DB, restarting meant either the transient issue had passed or cleared any connections to the db...
... sorry that's not much help!
regards
marc
It's running umbraco 8.12.2 right now, though it was upgraded from 8.2.2 a few months ago. The site was missing the SQLMainDomLock setting, so adding that will probably help. Thanks for pointing that out. Overlooked that piece when reviewing the work of the developer that handled the upgrade.
is working on a reply...