Please can someone assist with an Umbraco implementation question for a multi website installation.
We have a requirement to have each of our umbraco websites to run in their own applicaiton pool so that when we have issues or we deploy to them it won't affect any other websites (as well as the granularity advanteages for security).
A possible solution would be to create an IIS Website for each of those multiple websites and point them all to the same physical directory where the single umbraco installation is.
Can anyone tell me whether this will work or whether it will pose a problem pointing two IIS websites at the same Umbraco instance?
The only time really you would have multiple websites in one Umbraco instance is when you want multi lingual versions or your sites need to share images / macros etc. In all other cases you would create separate umbraco instances which would run as separate websites with own app pool.
If you really wanted to host multiple sites but in own app pool, I am not sure this would work but some thinking of the top of my head. Lets say you have 2 websites both in one umbraco instance and each with its own home node. So you have www.site1.com and www.site2.com. For each home node you have assigned domains in umbraco so for site 1 you have www.site1.com and site 2 www.site2.com. Next in iis you create 2 new sites with own app pools. Both point to same home directory. For each site in iis you assign the appropriate domain.
Some context firstly - I'm implementing many sites that will share the Document Type, Content and Templates implemented but will have specific content applicable to that website so I felt that it would be silly to duplicate that structure across 12 sites - so, to cut down on development and maintenance, I implemented this using the Umbraco multi-site structure. Could this also not be an applicable application for multi-sites in Umbraco?
Secondly - If I read your response correctly, you are saying that it should be okay to point multiple IIS websites at the same Umbraco implementation that houses a multiple sites (i.e. having multiple first level nodes with different host names configured)?
Will I not run in to problems - conflicts of some nature if I point many IIS websites at the same Umbraco instance?
I have not tried this but in theory not so long as each site has a root node and you assign a host name in umbraco to that root node also obviously you will need to assign domain in iis. So when you hit the site you will hit iis that will resolve the domain then the umbraco handler will route and serve up the correct site. Its effectively what you do when doing multi lingual and that all works fine so in theory this should as well.
The only place where there might be an issue is search. You will need some way of differentiating sites but its not a biggie with regards to iis that should be fine.
When administratior1 visited www.site1.com/umbraco/ and edited a node - and afterwards would administrator2 go to www.site2.com/umbraco/ and edit another node. Then the changes that administrator1 made, would be removed/changed back.
My issues were more memory caching issues where if you logged in on www.domainaaa.com and edited content on www.domainbbb.com (the two sites defined as two different domains, the changes would take a while to appear on domain www.domainbbb.com (or you would need to restart the app pool or something manual like that). The following settings should help with that.
I recently updated some ubraco settings in the umbracoSettings.config that have seemed to have helped with this (the last setting was the one that made the difference in my case but according to the article that I read, they all need to be set the same as this:
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>True</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
It seems that these settings are available in Umbraco 7, they are just not explicitly shipped in the umbracoSettings.config file. They default to the values specified below if not specified in the file, the following page explains this: http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/. If I've read this correctly, you should be able to insert those settings in your Umbraco 7 - umbracoSettings.config file.
It states the following:
"NOTE: in v7+ many of these settings are not explicitly contained in the configuration file that is shipped with Umbraco and most of these settings have default values assigned. These default values will be expressed below and you can insert these configuration items in the file to override the defaults."
...and the following settings are contained in the page:
XmlCacheEnabled
Turn Xml caching of content on/off. Umbraco Makes heavy use of caching content in memory to avoid database calls. This makes umbraco faster and more efficient. You should not in any way turn this off, unless you have a very good reason to do so. It will make your website very slow.
<!-- Enable / disable xml content cache --> <XmlCacheEnabled>True</XmlCacheEnabled>
ContinouslyUpdateXmlDiskCache
Updates the XmlCache whenever content is published. If it's set to false, then writes to the disk cache will be queued and performed asynchronously.
<!-- Update disk cache every time content has changed --> <ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
XmlContentCheckForDiskChanges
Checks if the disk cache file has been updated and if so, clears the in-memory cache to force the file to be read. Added to trigger updates of the in-memory cache when the disk cache file is updated.
<!-- Update in-memory cache if xml file is changed --> <XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
I still have the same problem - even if i add the settings to the umbracosettings.config.
I can change content in www.sitea.com/umbraco/ and then go to www.siteb.com/umbraco/ - and see the changes that I made in www.sitea.com. But if I go to the public site (www.siteb.com) the changes aren't to be found but if i republish the entire site on the Content-node the changes are visible on the website.
I see the last setting in the settings I provided form the Umbraco documentation XmlContentCheckForDiskChanges needs to be true. That should solve your problem.Did you use the default settings that I copied from the documentation or the settings that I provided in my initial post?
I stand corrected but by the process of elimination, if the database is being updated in the backoffice when you save, and the XmlCache file is being updated when you save and publish, the only possible outstanding item to update is the in-memory cache and should be updated when you set the setting XmlContentCheckForDiskChanges to true.
But I get the following error from the servers-errorlog - it seems like both websites try to update the umbraco.comfig at the same time:
System.IO.IOException: The process cannot access the file 'D:\wwwroot\website\App_Data\umbraco.config' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at umbraco.content.DeleteXmlCache()
at umbraco.content.PersistXmlToFile(XmlDocument xmlDoc)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Please don't shoot my explanation down if it incorrect because I haven't had any experience with Umbraco on a load balancing environment yet or used any of the distributed settings.
If both of these domains, however, are sitting on the same server, instead of separate servers (as they would in a load balanced environment), would it not stand to reason that the distributedCall would be trying to update the umbraco.config thinking that it was on another machine.
The way I understand Umbraco load balancing to work is that all of the instances of Umbraco in the farm all use the same database. If we look at what I've read about the distributedCall setting is that it configures Umbraco to update the other Umbraco cache instances (the umbraco.config and perhaps the in-memory cache) in the same farm so that they all stay synchronised.
What could be happenening here is that if the domains reside on the same machine, the umbraco cache being updated is the local cache and that is locked which is what could be causing the error.
But please note I really am speculating here, I can't be sure.
Multi-Website Installation - Split IIS Websites
Please can someone assist with an Umbraco implementation question for a multi website installation.
We have a requirement to have each of our umbraco websites to run in their own applicaiton pool so that when we have issues or we deploy to them it won't affect any other websites (as well as the granularity advanteages for security).
A possible solution would be to create an IIS Website for each of those multiple websites and point them all to the same physical directory where the single umbraco installation is.
Can anyone tell me whether this will work or whether it will pose a problem pointing two IIS websites at the same Umbraco instance?
Anthony,
The only time really you would have multiple websites in one Umbraco instance is when you want multi lingual versions or your sites need to share images / macros etc. In all other cases you would create separate umbraco instances which would run as separate websites with own app pool.
If you really wanted to host multiple sites but in own app pool, I am not sure this would work but some thinking of the top of my head. Lets say you have 2 websites both in one umbraco instance and each with its own home node. So you have www.site1.com and www.site2.com. For each home node you have assigned domains in umbraco so for site 1 you have www.site1.com and site 2 www.site2.com. Next in iis you create 2 new sites with own app pools. Both point to same home directory. For each site in iis you assign the appropriate domain.
Regards
Ismail
Thanks for your fast response Ismail.
Some context firstly - I'm implementing many sites that will share the Document Type, Content and Templates implemented but will have specific content applicable to that website so I felt that it would be silly to duplicate that structure across 12 sites - so, to cut down on development and maintenance, I implemented this using the Umbraco multi-site structure. Could this also not be an applicable application for multi-sites in Umbraco?
Secondly - If I read your response correctly, you are saying that it should be okay to point multiple IIS websites at the same Umbraco implementation that houses a multiple sites (i.e. having multiple first level nodes with different host names configured)?
Will I not run in to problems - conflicts of some nature if I point many IIS websites at the same Umbraco instance?
Anthony,
I have not tried this but in theory not so long as each site has a root node and you assign a host name in umbraco to that root node also obviously you will need to assign domain in iis. So when you hit the site you will hit iis that will resolve the domain then the umbraco handler will route and serve up the correct site. Its effectively what you do when doing multi lingual and that all works fine so in theory this should as well.
The only place where there might be an issue is search. You will need some way of differentiating sites but its not a biggie with regards to iis that should be fine.
Regards
Ismail
Thanks Ismail,
So the next step would be to test thoroughly and see whether any issues surface under load.
Is there anyone with hands on experience with this configuration?
(Multiple IIS Websites configured to point to the same physical Umbraco Multiple Website instance)
We've had some troubble with caching.
When administratior1 visited www.site1.com/umbraco/ and edited a node - and afterwards would administrator2 go to www.site2.com/umbraco/ and edit another node. Then the changes that administrator1 made, would be removed/changed back.
Thanks I've see that as well.
My issues were more memory caching issues where if you logged in on www.domainaaa.com and edited content on www.domainbbb.com (the two sites defined as two different domains, the changes would take a while to appear on domain www.domainbbb.com (or you would need to restart the app pool or something manual like that). The following settings should help with that.
I recently updated some ubraco settings in the umbracoSettings.config that have seemed to have helped with this (the last setting was the one that made the difference in my case but according to the article that I read, they all need to be set the same as this:
I could imagine that this would work great in older versions of Umbraco. But do you know if there are any similar settings in Umbraco 7+?
It seems that these settings are available in Umbraco 7, they are just not explicitly shipped in the umbracoSettings.config file. They default to the values specified below if not specified in the file, the following page explains this: http://our.umbraco.org/documentation/using-umbraco/config-files/umbracoSettings/. If I've read this correctly, you should be able to insert those settings in your Umbraco 7 - umbracoSettings.config file.
It states the following:
"NOTE: in v7+ many of these settings are not explicitly contained in the configuration file that is shipped with Umbraco and most of these settings have default values assigned. These default values will be expressed below and you can insert these configuration items in the file to override the defaults."
...and the following settings are contained in the page:
XmlCacheEnabled
Turn Xml caching of content on/off. Umbraco Makes heavy use of caching content in memory to avoid database calls. This makes umbraco faster and more efficient. You should not in any way turn this off, unless you have a very good reason to do so. It will make your website very slow.
ContinouslyUpdateXmlDiskCache
Updates the XmlCache whenever content is published. If it's set to false, then writes to the disk cache will be queued and performed asynchronously.
XmlContentCheckForDiskChanges
Checks if the disk cache file has been updated and if so, clears the in-memory cache to force the file to be read. Added to trigger updates of the in-memory cache when the disk cache file is updated.
I still have the same problem - even if i add the settings to the umbracosettings.config.
I can change content in www.sitea.com/umbraco/ and then go to www.siteb.com/umbraco/ - and see the changes that I made in www.sitea.com.
But if I go to the public site (www.siteb.com) the changes aren't to be found but if i republish the entire site on the Content-node the changes are visible on the website.
I see the last setting in the settings I provided form the Umbraco documentation XmlContentCheckForDiskChanges needs to be true. That should solve your problem.Did you use the default settings that I copied from the documentation or the settings that I provided in my initial post?
I stand corrected but by the process of elimination, if the database is being updated in the backoffice when you save, and the XmlCache file is being updated when you save and publish, the only possible outstanding item to update is the in-memory cache and should be updated when you set the setting XmlContentCheckForDiskChanges to true.
I found a solution that works:
In the umbracosettings.config I use the distributedCall property where i use the following data:
And it works like a charm!
But I get the following error from the servers-errorlog - it seems like both websites try to update the umbraco.comfig at the same time:
Any ideas - how to get rid of the error? :-)
Please don't shoot my explanation down if it incorrect because I haven't had any experience with Umbraco on a load balancing environment yet or used any of the distributed settings.
If both of these domains, however, are sitting on the same server, instead of separate servers (as they would in a load balanced environment), would it not stand to reason that the distributedCall would be trying to update the umbraco.config thinking that it was on another machine.
The way I understand Umbraco load balancing to work is that all of the instances of Umbraco in the farm all use the same database. If we look at what I've read about the distributedCall setting is that it configures Umbraco to update the other Umbraco cache instances (the umbraco.config and perhaps the in-memory cache) in the same farm so that they all stay synchronised.
What could be happenening here is that if the domains reside on the same machine, the umbraco cache being updated is the local cache and that is locked which is what could be causing the error.
But please note I really am speculating here, I can't be sure.
is working on a reply...