One day I observe in our QA
staging server a component ,StateManager, is writing the log for data initialization
and its happing very unnatural.
component,"StateManager", follows the singleton pattern and it is
responsible to keep all the static/configurable information at the time of very
first request and should not reload until the service/sever is restarted. It is
very heavy process and can affects the performance of the application and not affordable
to load again n again.
I surprised to see the logs
about the unexpected behavior of this component.
After that I run many cases
and read some articles to check the cause of re-initialization of this
component and found some reasons as shown below.
An application domain will
unload when any one of the following occurs:
·Machine.Config is modified
·Web.Config is modified
·Global.asax is modified
·The bin directory or its contents is modified
·The number of re-compilations (aspx, ascx or asax) exceeds the
limit specified by the <compilation numRecompilesBeforeAppRestart=/>
setting in machine.config or web.config (by default this is set to
·The physical path of the virtual directory is modified