The above is a simple representation of a configuration that i have set up for a site and I am getting strange behaviour that I do not understand and hope to get some more understanding here.
Web 1 and Web 2 are virtual web servers running windows server 2008 R2 Enterprise edition with Service pack 1 installed that both point to a single file share on a separate machine. There is also a separate database server.
The situation - I can navigate to the admin section of Web 1 and make some content changes, publish them and they are immediately available on Web1. The umbraco.config file is correctly updated as expected.
However, Web 2 does not reflect these changes immediately. In IIS7 on both servers Response caching has been turned off at the server level and the site level. I have also tried setting "Maximum cached response...." to 0. Once I do an IIS reset, the content in available on Web 2 but for obvious reasons this is not a solution.
So my question is, where could this caching be heppening? Are there some other settings in umbracoSettings.config or elsewhere that I should be looking at to alleviate this problem?
Think you have fallen foul of the fact that the umbraco.config is cached in memory on the separate iis instances, and not refetched from the file system unless the application pool is restarted.
Another option is to turn this in memory caching off... so you force reading of the physical file.
config/umbracosetting.config
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>false</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
I have tried to play around with those settings and come up with a few things.
1. Setting <XmlCacheEnabled>false</XmlCacheEnabled> does indeed seem to make sure that changes are seen immediately on both servers when something is published, however, it does not behave in the same way when something is unpublished or deleted, that is to say, I can still see items on Web 2 (web 1 being the primary admin machine). Is there a good reason for this or is it one of life's mysteries?
2. Setting <XmlCacheEnabled>false</XmlCacheEnabled>, results in the umbraco.config file no longer being written to disk even though <ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>, is this the correct behaviour or is there something I am missing here? I would have expected the file still to be written to disk...
3. Does <XmlCacheEnabled>false</XmlCacheEnabled> result in a potential performance hit because Umbraco now has to call the datbase for information that it would have gotten from the file?
Caching umbraco.config and umbracoSettings.config
Hi All
The above is a simple representation of a configuration that i have set up for a site and I am getting strange behaviour that I do not understand and hope to get some more understanding here.
Web 1 and Web 2 are virtual web servers running windows server 2008 R2 Enterprise edition with Service pack 1 installed that both point to a single file share on a separate machine. There is also a separate database server.
The situation - I can navigate to the admin section of Web 1 and make some content changes, publish them and they are immediately available on Web1. The umbraco.config file is correctly updated as expected.
However, Web 2 does not reflect these changes immediately. In IIS7 on both servers Response caching has been turned off at the server level and the site level. I have also tried setting "Maximum cached response...." to 0. Once I do an IIS reset, the content in available on Web 2 but for obvious reasons this is not a solution.
So my question is, where could this caching be heppening? Are there some other settings in umbracoSettings.config or elsewhere that I should be looking at to alleviate this problem?
Thanks
Bradley
http://our.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments
Might be useful. (with the distributed calls)
Think you have fallen foul of the fact that the umbraco.config is cached in memory on the separate iis instances, and not refetched from the file system unless the application pool is restarted.
Another option is to turn this in memory caching off... so you force reading of the physical file.
config/umbracosetting.config
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>false</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
Hi Mark
Thanks for the response.
I have tried to play around with those settings and come up with a few things.
1. Setting <XmlCacheEnabled>false</XmlCacheEnabled> does indeed seem to make sure that changes are seen immediately on both servers when something is published, however, it does not behave in the same way when something is unpublished or deleted, that is to say, I can still see items on Web 2 (web 1 being the primary admin machine). Is there a good reason for this or is it one of life's mysteries?
2. Setting <XmlCacheEnabled>false</XmlCacheEnabled>, results in the umbraco.config file no longer being written to disk even though <ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>, is this the correct behaviour or is there something I am missing here? I would have expected the file still to be written to disk...
3. Does <XmlCacheEnabled>false</XmlCacheEnabled> result in a potential performance hit because Umbraco now has to call the datbase for information that it would have gotten from the file?
Thanks
Bradley
is working on a reply...