As a first step we migrated EPiServer CMS 6 R2 to 7.1 and it worked.
Then as a later step PageTypeBuilder was removed and EPiServer 7 typed pages were used instead, after that is done as we have a lot of page types and pages it seems that module: ModelSyncInitialization never finishes and is 'stuck' on reading whole database to syncronize par of log file example(log is the same and is hundreds of megabytes just different PageIds and Version Ids):
2014-03-20 16:22:01,715; [1]; DEBUG; EPiServer.Data.Providers.ConnectionContext.OpenConnection(:0); Opening Connection
2014-03-20 16:22:01,717; [1]; DEBUG; EPiServer.DataAccess.ContentLoadDB.LoadContentInternal(:0); 2.13.2 Loading content from database for content with id: 29486_157604
2014-03-20 16:22:01,723; [1]; DEBUG; EPiServer.Data.Providers.ConnectionContext.CloseConnection(:0); Closing Connection
2014-03-20 16:22:01,724; [1]; INFO ; EPiServer.Core.ContentProvider+<>c__DisplayClassf.<LoadContentFromCacheOrRepository>b__d(:0); ContentLink=29486_157604, ReadAndCacheObject delegate...LoadContent returned Content object
2014-03-20 16:22:01,724; [1]; INFO ; EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(:0); ContentLink=29486_157604, returning ContentReference object
2014-03-20 16:22:01,726; [1]; INFO ; EPiServer.Core.ContentProvider+<>c__DisplayClassf.<LoadContentFromCacheOrRepository>b__d(:0); ContentLink=29471_157605, ReadAndCacheObject delegate...calling LoadContent
2014-03-20 16:22:01,726; [1]; DEBUG; EPiServer.Data.Providers.SqlDatabaseHandler.GetConnection(:0); Opening a new transaction-less connection
2014-03-20 16:22:01,727; [1]; DEBUG; EPiServer.Data.Providers.ConnectionContext.OpenConnection(:0); Opening Connection
2014-03-20 16:22:01,731; [1]; DEBUG; EPiServer.DataAccess.ContentLoadDB.LoadContentInternal(:0); 2.13.2 Loading content from database for content with id: 29471_157605
2014-03-20 16:22:01,744; [1]; DEBUG; EPiServer.Data.Providers.ConnectionContext.CloseConnection(:0); Closing Connection
2014-03-20 16:22:01,748; [1]; INFO ; EPiServer.Core.ContentProvider+<>c__DisplayClassf.<LoadContentFromCacheOrRepository>b__d(:0); ContentLink=29471_157605, ReadAndCacheObject delegate...LoadContent returned Content object
2014-03-20 16:22:01,749; [1]; INFO ; EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(:0); ContentLink=29471_157605, returning ContentReference object
2014-03-20 16:22:01,750; [1]; INFO ; EPiServer.Core.ContentProvider+<>c__DisplayClassf.<LoadContentFromCacheOrRepository>b__d(:0); ContentLink=29459_157606, ReadAndCacheObject delegate...calling LoadContent
2014-03-20 16:22:01,751; [1]; DEBUG; EPiServer.Data.Providers.SqlDatabaseHandler.GetConnection(:0); Opening a new transaction-less connection
2014-03-20 16:22:01,752; [1]; DEBUG; EPiServer.Data.Providers.ConnectionContext.OpenConnection(:0); Opening Connection
So in the end it seems we have extremely slow ModelSyncInitialization module that is not able to finish even in couple of hours.
Have anyone seen something like this?
ModelSynchInitialization should not read up actual content instances, it will read up the definitions and compare it with your .NET types.
Can you attach a .NET profiler (like e.g. dotTrace or Ants) and let the initialization run a while under the profiler and then take a snapshot. Then you can hopefully see what is causing the content loading.
Thanks Johan!
Using reflector debugging and looking at call stack is how I figured out that EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository is called initially from ModelSyncInitialization module in the first place.
So I let it run throughout last night and it have synchronized everything(after removing PageTypeBuilder from solution) and now it's starting the same as before.
So as it is one time thing will not investigate it any further.
Suggestions for others that are removing PTB, would be, try to wait first in this case and then just check results, if they are fine then you're good to go, because I spent some time because I did not have patience to wait it to finish. Sometimes patience is all you need.
We are experiencing some really slow startuptimes for our EPiServer 7 site. Did a check with Startup Performance tool (http://world.episerver.com/Blogs/Per-Bjurstrom/Archive/2012/9/EPiServer-7-Startup-Performance/) and found that > 90% of the time was used by ModelSyncInitialization.
It can take several minutes and sometimes it even times out and the site cannot startup at all. The site has ~30 pagetypes, ~50 blocktypes and about 10 000 pages.
Anyone else that has experienced similar problems? Are there any magic tricks?