Try our conversational search powered by Generative AI!

Could not read database schema version. There is likely an ongoing update of the database

Vote:
 

Hi All

I'm currently upgrading to episerver 9 using automatica database schema  - it all works like a charm in dev machines . However it is failing on larger database size (copy of prod) while upgrading db schema with the following error

Any ideas before I take the manual db update route?

Could not read database schema version. There is likely an ongoing update of the database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.DataException: Could not read database schema version. There is likely an ongoing update of the database.

Source Error: 

[DataException: Could not read database schema version. There is likely an ongoing update of the database.]
   EPiServer.Data.SchemaUpdates.DatabaseVersionRetriever.b__3_0() +689
   EPiServer.Data.Providers.<>c__DisplayClass28_0`1.b__0() +66
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +113
   EPiServer.Data.SchemaUpdates.DatabaseVersionRetriever.GetDatabaseVersion(Boolean forceRefresh) +147
   EPiServer.Data.DatabaseVersionValidator.GetStatus(ConnectionStringsSection connectionStrings) +117
   EPiServer.Data.SchemaUpdates.<>c__DisplayClass5_0.b__0(IDatabaseSchemaUpdater u) +51
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +82
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +536
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   EPiServer.Data.SchemaUpdates.DatabaseSchemaManagerImplementation.EnsureDatabaseSchema(ConnectionStringsSection connectionStrings, Boolean automaticSchemaUpdatesEnabled, Boolean automaticSchemaCreationEnabled) +193
   EPiServer.Data.DataInitialization.Initialize(InitializationEngine context) +31
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +64
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +312

[InitializationException: Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=9.6.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   





Thanks,

Kashif

#144572
Feb 15, 2016 18:48
Vote:
 

My best guess is that it's waiting for an update to complete but times out...

Might work to just hit it a few times :)

I would dotPeek that method and see if I could increase timeout. If that doesn't work, so each step manually I guess. 

#144574
Feb 15, 2016 20:24
Vote:
 

There is a 5 minute command timeout in GetDatabaseVersion. In this method it only gets the current schema version but failing at that step with exception -2 which is command timeout.

#144626
Feb 16, 2016 12:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.