Problem ModelSyncInitialization Timeout when jumping between branches

Vote:
 

Hello! CMS 11.20

When i work in diff branches and jumps between, and when it has different propertys (many props and newly added), i do very often get this timeout on modelsync. Is there a way to alloy higher timeout time by default on my dev machine?

[SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Operation cancelled by user.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +273
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +765
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4616
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +513
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3344
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +707
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +540
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +391
   EPiServer.Data.Providers.Internal.<>c__DisplayClass32_0.<ExecuteTransaction>b__0() +18
   EPiServer.Data.Providers.Internal.<>c__DisplayClass33_0`1.<ExecuteTransaction>b__0() +60
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +704
   EPiServer.DataAccess.Internal.PropertyDefinitionDB.DeleteFromDb(Int32 id) +30
   EPiServer.DataAccess.Internal.PropertyDefinitionDB.Delete(PropertyDefinition propertyDefinition) +37
   EPiServer.DataAbstraction.Internal.DefaultPropertyDefinitionRepository.Delete(PropertyDefinition propertyDefinition) +48
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.CommitProperties(Boolean deleteUnusedTypes) +140
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean commitChanges) +354
   EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context) +573
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +58
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +123
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +257

[InitializationException: Initialize action failed for Initialize on class EPiServer.Initialization.Internal.ModelSyncInitialization, EPiServer, Version=11.20.16.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +812
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +194
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +864
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +226
   EPiServer.Global..ctor() +42
#297471
Mar 01, 2023 14:16
Vote:
 

This issue was raised arund scheduled jobs timing out many moons ago, could a similar approach work for Model Synch ? 

Episerver CMS - Timeout exceptions during scheduled jobs – Support Help Center (optimizely.com) 

#297472
Mar 01, 2023 14:41
Vote:
 

Thanks Minesh! Seems to work everytime now

Solution: add in web.config for .netFramework 4.7:

  <configSections>    
      <section name="episerver.dataStore" type="EPiServer.Data.Configuration.EPiServerDataStoreSection, EPiServer.Framework.AspNet" />
  </configSections>
  <episerver.dataStore>
    <dataSettings
           connectionStringName="EPiServerDB"
           retries="5"
           retryDelay="0:0:0.1"
           databaseQueryTimeout="0:02:00" />
  </episerver.dataStore>
#297476
Mar 01, 2023 18:50
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.