Guest Author:"Application is busy under initialization phase"

blog header image

Again, I've been reckless enough to lend out blog-space to a bright developer. This time it's Thomas Fritzen from the  partner, Creuna. Here is his post:

 

The following has been experience on EPiServer 5.1.422.269

While developing a medium sized website (40K pages) for a customer, using local EPiServer installations for each developer, and a central database, we experienced quite  a lot of latency in our development environment after each recompile – and often the error “Application is busy under initialization phase” would occur – when trying to click on more than one link or when reloading a page to quickly on the website.

This can be quite a pain – especially in edit mode - and as the number of pages on the website grew, the site took longer and longer to initialize. (3-4 seconds).

To find out why this delay occurred, we enabled the debug mode logging in EPiServer.

This revealed that the culprit was loading the DataFactoryCache with 38000+ elements

2008-12-12 11:53:11,446 INFO  - Passed ValidateEnterpriseLicense

2008-12-12 11:53:11,446 INFO  - Passed InitializeXFormEmail

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.MasterKey, retval=null

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.MasterKey, value=object of type System.Int64, absoluteExpiration=31-12-9999 23:59:59, slidingExpiration=00:00:00, priority=NotRemovable

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.Version, retval=null

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.Version, value=object of type System.Int64, absoluteExpiration=31-12-9999 23:59:59, slidingExpiration=00:00:00, priority=NotRemovable

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.MasterKey, retval=object of type System.Int64

2008-12-12 11:53:11,446 DEBUG - key=DataFactoryCache.Version, retval=object of type System.Int64

2008-12-12 11:53:11,602 DEBUG - key=EPChildrenData:5834, value=object of type EPiServer.Core.PageReferenceCollection, absoluteExpiration=31-12-9999 23:59:59, slidingExpiration=12:00:00, priority=Default

……

2008-12-12 11:53:14,065 DEBUG - key=EPChildrenData:51936, value=object of type EPiServer.Core.PageReferenceCollection, absoluteExpiration=31-12-9999 23:59:59, slidingExpiration=12:00:00, priority=Default

2008-12-12 11:53:14,065 INFO  - Passed DataFactoryCache.Initialize

2008-12-12 11:53:14,065 INFO  - Passed LazyIndexer

These log lines indicate that the cache setting where wrong for our development environment.

To resolve the issue – some reflector and test work – revealed that setting

pageCacheSlidingExpiration="0"

in the siteSettings of web.config removed this caching.

Now load time is about one second including recompile of the C# code.

It seem the default value of "12:00:00" is only good for a production site – or if you are developing a fairly small website. Setting this value to 0 also has the side effect of not caching data locally – so you see the changes that other people in your development team has made to the pages that they work on, without reloading your site locally.

 

Regards, Thomas Fritzen Creuna.dk

Recent posts