Subdomain content does not update when using shared hosting provider
Summary:
I have an Umbraco instance with several subdomains. When hosted in a shared hosting provider, content does not update - or, at least does not do so for several hours (perhaps until the next App Pool recycling). This behaviour does not happen on my local machine with IIS.
More details:
I have an Umbraco instance with sub domains as follows:
www.mydomain.com
subdomain1.mydomain.com
subdomain2.mydomain.com
In my Content tree, I have three branches for three sites. They have been configured to use each of the sub domains (well, the first one has not, but www is the default).
This works. If I browse to each of the above URLs, I can view each site fine.
The problem comes when I want to update content in one of the subdomains.
So, the simplest test is to add a new page under each branch, then try to browse to it. If I add a new one to the www branch, then refresh www.mydomain.com, the new page appears straight away in my menu bar (so is picked up from the content); and I can browse to it.
If I do the same in either of my subdomains, the page does not appear and I cannot even browse to it via the "link to document" URL shown on the properties tab.
However, if I wait some time (a few hours) then I can browse to the new page OK.
Now, I have a staging installation of Umbraco on my Win7 laptop. This uses IIS 6.1. It is identical to the live setup except the URLs are:
www.mydomain.local
subdomain1.mydomain.local
subdomain2.mydomain.local
(I have added the .local domains to my hosts file, to the bindings on the website in IIS and to the "Manage hostnames" in the Umbraco back office).
On my local installation, I can update content in the subdomains with no problems at all.
Now, I have no ablilty to restart IIS or recycle the applicaion pool using my shared hosting provider (I have the ASP Ultimate package with Storm Internet - this provides me with a Plesk back end).
So.. what might it be that prevents me from doing this with the shared hosting provider?
I have found a workaround - I "flash" the web.config file (by using FileZilla to download my web.config, the re-upload the same file). But this workaround is not going to be workable for my users.
Do you have the option to reset the permissions for the network service and iusr in the plesk panel? I suspect this might is a permissions issue from the description above...If you choose to right click on the top "Content" node and repulish the entire site does the newly created content then appear straight away? If so I think it's because the XML cache is not being written while you publish your nodes for some reason.
If you don't have access to do it yourself then get in touch with the support and ask if they can check that the permissions are ok.
Just out of curiosity...what version of Umbraco are you using?
I have just tried your suggestion of republishing the entire site by the instructions you gave. I got no error message, but it did not display my content correctly.
With Plesk, I do have the permission to set the rights for both "Plesk IIS User" and "Plesk IIS WP User" (as they call them). I haven't granted full control for all the subfolders in my website - but I have granted to enough to get the installation working.
I'm using Umbraco 4.11.2.2. I've just upgraded from 4.8.0 (via the steps of 4.9.0 and 4.10.1 - following the upgrade instructions for each). But I was getting the problem with 4.8.0. My hope was that upgrading would have fixed the "bug".
Futhermore, if I make a change to the template (master page) that the subdomain site uses (e.g. add or remove a bit of static text), the change shows straight away without need for any other change.
I've verified that the App_Data/umbraco.config file is being updated after I click to publish my change. And, that the file is being updated with the correct changes. Both "Plesk IIS User" and "Plesk IIS WP User" have full rights on that folder.
On your suggestion, I have gone into all my macros and unchecked the "Cache By Page" property.
However, it does not solve the problem.
An easier workaround to the one I described (using FTP) is to "flash" the web.config within the Plesk UI. You can click the web.config file to bring up a text editor. Clicking "OK" resaves it - and after that, all the published changes in my subdomain site come back.
this behaviour can occur if all our sites have their own app-pool.
The umbraco.config file normally is cached in the memory of the app-pool. If you login umbraco and edit a page, the memory is updated and the umbraco.config file is updated. You describe that the file is udated on disk, but not the memory of the subdomains. Upon a restart of the app-pool, the memory is filled with the umbraco.config file, and only then shows the changes.
You could try this: use a subdomain to login into umbraco and edit a page there. Does it get updated on the site of the subdomain but not on the www-domain?
If so, you have seperate app-pools. You'd have to ask your hosting-provider to change this so all domains actually use 1 IIS-instance and thus the same app-pool.
Logged on to http://subdomain1.mydomain.com/umbraco/login.aspx. I saw the same Umbraco back end as for www. I was then able to edit a page in subdomain1 and the change appeared on the website immediately. When I tried to make a change to the main website, it did not - and I had to flash the web.config.
It sounds consistent with your analysis. I've not been able to work out how to configure Plesk with regards App Pools for subdomains. I must admit that I am surprised that it has done this - sounds more complicated than needs be.
I'll contact my hosting support and ask if they can put all my subdomains under the on App Pool and will let you know what happens.
Many thanks to you and Jan for your help. It's been superp.
My website host has come back to me and informed me that all my subdomains are running under the same Application Pool.
Any other ideas?
Thanks to your advice, I now have a better workaround than before - make sure that for subdomain foo, get my content editors to log into http://foo.mydomain.com/umbraco/login.aspx - but it's not very elegant and prone to error.
I'm not convinced they give you the right information :(
I'm not familiar with Plesk, but do you have a seperate plesk panel for each (sub)domain? You should have only 1 because all domains should point to the same website in IIS (each domain should NOT have its own website in IIS)
Another question: did you assign the (sub)domain-names in umbraco?
I do indeed have only one Plesk panel. Under the "Settings" main tab, it appears that I have only one IIS Application Pool.
I have indeed set the subdomain names in Umbraco (right-click the root and select "Manage hostnames"). But I knew that because my websites do work on each subdomain - it's just the way it updates.
Something more that puzzles me - now that I know about the App_Data/umbraco.config file - is that it only contains the pages on my www site, not any of the subdomains. I've searched to see if there is another config file anywhere being updated with that content, but not found one. If Umbraco uses this, then why is it only for my www site, and not others??
Ah ok, I guess your hosting provider is right after all then :) But, then there's still the problem...
If your umbraco.config only has pages from your www site, then the other sites shouldn't be working I guess. If you touch the web.config, you say the pages become visible on the other domains (or at least the changes show up). If you open up the umbraco.config then, does it then hold the pages from the other domains?
Normally all pages from the site should reside in the umbraco.config, no matter how many subdomains you have.
Which version of umbraco are you using and what does your content-tree look like?
Ah ok, I guess your hosting provider is right after all then :) >>Well, I can only go on what they tell me...
But, then there's still the problem... >>Indeed.
If your umbraco.config only has pages from your www site, then the other sites shouldn't be working I guess. >>Sorry. I was mistaken. On closer examination, the umbraco.config does have the pages of all the sites. I actually have another very strange problem of a page that I'd created, then deleted, which does not appear in my Back Office UI, but which still appears on the Menu bar on my page and which I can still browse to! It was the absence of this which made me initially believe that the umbraco.config did not have the other sites.
If you touch the web.config, you say the pages become visible on the other domains (or at least the changes show up). If you open up the umbraco.config then, does it then hold the pages from the other domains? >>Yes it does.
Normally all pages from the site should reside in the umbraco.config, no matter how many subdomains you have.
Which version of umbraco are you using and what does your content-tree look like? >>I have 4.11.2.2
After further prodding, asking the questions very explicitly, I am now convinced that all my sub-domains are running under the same App Pool.
Previously, my domain was sharing the same App Pool as all the other customers on the shared hosting box, but now they have given me my own dedicated pool.
I have repeated the problem (log in to admin on one subdomain; edit the contents of another subdomain site, then publish; obserb that the content is not yet visible; "flash" the web.config; now the content is visible).
Thanks for your help guys, but I still have this problem.
Subdomain content does not update when using shared hosting provider
Summary:
I have an Umbraco instance with several subdomains. When hosted in a shared hosting provider, content does not update - or, at least does not do so for several hours (perhaps until the next App Pool recycling). This behaviour does not happen on my local machine with IIS.
More details:
I have an Umbraco instance with sub domains as follows:
In my Content tree, I have three branches for three sites. They have been configured to use each of the sub domains (well, the first one has not, but www is the default).
This works. If I browse to each of the above URLs, I can view each site fine.
The problem comes when I want to update content in one of the subdomains.
So, the simplest test is to add a new page under each branch, then try to browse to it. If I add a new one to the www branch, then refresh www.mydomain.com, the new page appears straight away in my menu bar (so is picked up from the content); and I can browse to it.
If I do the same in either of my subdomains, the page does not appear and I cannot even browse to it via the "link to document" URL shown on the properties tab.
However, if I wait some time (a few hours) then I can browse to the new page OK.
Now, I have a staging installation of Umbraco on my Win7 laptop. This uses IIS 6.1. It is identical to the live setup except the URLs are:
Hi Nick
Do you have the option to reset the permissions for the network service and iusr in the plesk panel? I suspect this might is a permissions issue from the description above...If you choose to right click on the top "Content" node and repulish the entire site does the newly created content then appear straight away? If so I think it's because the XML cache is not being written while you publish your nodes for some reason.
If you don't have access to do it yourself then get in touch with the support and ask if they can check that the permissions are ok.
Just out of curiosity...what version of Umbraco are you using?
/Jan
Hi Jan,
I have just tried your suggestion of republishing the entire site by the instructions you gave. I got no error message, but it did not display my content correctly.
With Plesk, I do have the permission to set the rights for both "Plesk IIS User" and "Plesk IIS WP User" (as they call them). I haven't granted full control for all the subfolders in my website - but I have granted to enough to get the installation working.
I'm using Umbraco 4.11.2.2. I've just upgraded from 4.8.0 (via the steps of 4.9.0 and 4.10.1 - following the upgrade instructions for each). But I was getting the problem with 4.8.0. My hope was that upgrading would have fixed the "bug".
Where does this XML cache live?
Nick
Futhermore, if I make a change to the template (master page) that the subdomain site uses (e.g. add or remove a bit of static text), the change shows straight away without need for any other change.
Hi Nick
The XML cache live in the App_Data folder and is named umbraco.config.
Coming to think of it - have you added caching to some of your macros in the developer section?
/Jan
Hi Jan,
I've verified that the App_Data/umbraco.config file is being updated after I click to publish my change. And, that the file is being updated with the correct changes. Both "Plesk IIS User" and "Plesk IIS WP User" have full rights on that folder.
On your suggestion, I have gone into all my macros and unchecked the "Cache By Page" property.
However, it does not solve the problem.
An easier workaround to the one I described (using FTP) is to "flash" the web.config within the Plesk UI. You can click the web.config file to bring up a text editor. Clicking "OK" resaves it - and after that, all the published changes in my subdomain site come back.
Nick
Hi Nick,
this behaviour can occur if all our sites have their own app-pool.
The umbraco.config file normally is cached in the memory of the app-pool. If you login umbraco and edit a page, the memory is updated and the umbraco.config file is updated. You describe that the file is udated on disk, but not the memory of the subdomains. Upon a restart of the app-pool, the memory is filled with the umbraco.config file, and only then shows the changes.
You could try this: use a subdomain to login into umbraco and edit a page there. Does it get updated on the site of the subdomain but not on the www-domain?
If so, you have seperate app-pools. You'd have to ask your hosting-provider to change this so all domains actually use 1 IIS-instance and thus the same app-pool.
HTH,
Peter
Hi Peter
I just learned something new and important there - thanks a bunch! :)
/Jan
HI Peter,
I tried the following:
Logged on to http://subdomain1.mydomain.com/umbraco/login.aspx. I saw the same Umbraco back end as for www. I was then able to edit a page in subdomain1 and the change appeared on the website immediately. When I tried to make a change to the main website, it did not - and I had to flash the web.config.
It sounds consistent with your analysis. I've not been able to work out how to configure Plesk with regards App Pools for subdomains. I must admit that I am surprised that it has done this - sounds more complicated than needs be.
I'll contact my hosting support and ask if they can put all my subdomains under the on App Pool and will let you know what happens.
Many thanks to you and Jan for your help. It's been superp.
Nick
My website host has come back to me and informed me that all my subdomains are running under the same Application Pool.
Any other ideas?
Thanks to your advice, I now have a better workaround than before - make sure that for subdomain foo, get my content editors to log into http://foo.mydomain.com/umbraco/login.aspx - but it's not very elegant and prone to error.
I'm not convinced they give you the right information :(
I'm not familiar with Plesk, but do you have a seperate plesk panel for each (sub)domain? You should have only 1 because all domains should point to the same website in IIS (each domain should NOT have its own website in IIS)
Another question: did you assign the (sub)domain-names in umbraco?
I do indeed have only one Plesk panel. Under the "Settings" main tab, it appears that I have only one IIS Application Pool.
I have indeed set the subdomain names in Umbraco (right-click the root and select "Manage hostnames"). But I knew that because my websites do work on each subdomain - it's just the way it updates.
Something more that puzzles me - now that I know about the App_Data/umbraco.config file - is that it only contains the pages on my www site, not any of the subdomains. I've searched to see if there is another config file anywhere being updated with that content, but not found one. If Umbraco uses this, then why is it only for my www site, and not others??
Ah ok, I guess your hosting provider is right after all then :) But, then there's still the problem...
If your umbraco.config only has pages from your www site, then the other sites shouldn't be working I guess. If you touch the web.config, you say the pages become visible on the other domains (or at least the changes show up). If you open up the umbraco.config then, does it then hold the pages from the other domains?
Normally all pages from the site should reside in the umbraco.config, no matter how many subdomains you have.
Which version of umbraco are you using and what does your content-tree look like?
See inline answers:
Ah ok, I guess your hosting provider is right after all then :)
>>Well, I can only go on what they tell me...
But, then there's still the problem...
>>Indeed.
If your umbraco.config only has pages from your www site, then the other sites shouldn't be working I guess.
>>Sorry. I was mistaken. On closer examination, the umbraco.config does have the pages of all the sites. I actually have another very strange problem of a page that I'd created, then deleted, which does not appear in my Back Office UI, but which still appears on the Menu bar on my page and which I can still browse to! It was the absence of this which made me initially believe that the umbraco.config did not have the other sites.
If you touch the web.config, you say the pages become visible on the other domains (or at least the changes show up). If you open up the umbraco.config then, does it then hold the pages from the other domains?
>>Yes it does.
Normally all pages from the site should reside in the umbraco.config, no matter how many subdomains you have.
Which version of umbraco are you using and what does your content-tree look like?
>>I have 4.11.2.2
After further prodding, asking the questions very explicitly, I am now convinced that all my sub-domains are running under the same App Pool.
Previously, my domain was sharing the same App Pool as all the other customers on the shared hosting box, but now they have given me my own dedicated pool.
I have repeated the problem (log in to admin on one subdomain; edit the contents of another subdomain site, then publish; obserb that the content is not yet visible; "flash" the web.config; now the content is visible).
Thanks for your help guys, but I still have this problem.
is working on a reply...