we're having a site which can be accessed (default site in iis) through 2 domains (1 internal, 1 external) but don't have anything specific configured in Umbraco for it. So the 2 domains both show the same content/root node. But we're having a weird issue. Sometimes (like now) 1 url shows the site as it should, but the other one throws an error. (there isn't any domain-specific code). Have checked the log but nothing really helps. The error atm is an Index out of bounds but all is pointing in the direction of a caching issue i think. Not sure how this can even happen. looking for a way to "fix" this but not sure where to even start. Bonus: the production environment has the same thing, also 1 internal, 1 external domain & also showing occasional errors.
umbraco v 7.4.3
a part of the stacktrace:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
System.Collections.Generic.List`1.Insert(Int32 index, T item) +65
Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.InitializeChildren() +505
Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.get_Children() +48
ASP._Page_Views_Partials_Header_cshtml.Execute() in d:\*******************\Views\Partials\Header.cshtml:18
Line 18 in Header.cshtml:
var targetGroups = currentsite.Children().Where(o => o.DocumentTypeAlias == "landingspagina").ToList() ;
--> currentSite is the current root/parent node. And there are always 8 children.
it's basically the first line of code of the whole page that tries to fetch something from cache. If we publish the root node again all troubles are gone again.
it worries me that it's an issue on 1 domain but not on the other and they are both accessing the same database/filesystem/umbraco node.
The umbracoServer table only contains the domain which is not showing an error. But i guess they aren't both in there because they are located on the same server.
Have no idea on how to reproduce it but it happens every so often.
If anyone could shed some light on this, that would be awesome :)
var currentsite = Model.Content.AncestorsOrSelf().First(x => x.DocumentTypeAlias == "site" || x.DocumentTypeAlias.ToLower().EndsWith("campagne"));
There is always 1. The type we're on can only exist underneath 'site'. The other 8 children of currentsite are of the type 'landingspagina'.
Don't think it's code-related since it runs fine on the other domainname & if we publish the node again everything works fine again (for some time) on both domain names.
I'm not sure it is. Wouldn't both url's give a problem then?
Also worth noting that the rest of the site keeps functionning as usual.. Even though the header is on every single page...
That does sound strange... I noticed kind of a similar problem where the XML cache got corrupted when the IIS restarted at the same time as someone tried to publish something in Umbraco. Thats why I always set my Umbraco sites to recycle in the middle of the night instead of that horrendous default setting in IIS :P
But if the same component from another place can actually read the XML cache that doesn't seem to be the problem :/ Might be related tho... does seem to fix itself with a publish or restart and thats when the XML cache is rebuilt.
Might it be that the other places actually doesnt read from the XML cache if they are working?
Caching issue on multidomain/single node setup.
Hi all,
we're having a site which can be accessed (default site in iis) through 2 domains (1 internal, 1 external) but don't have anything specific configured in Umbraco for it. So the 2 domains both show the same content/root node. But we're having a weird issue. Sometimes (like now) 1 url shows the site as it should, but the other one throws an error. (there isn't any domain-specific code). Have checked the log but nothing really helps. The error atm is an Index out of bounds but all is pointing in the direction of a caching issue i think. Not sure how this can even happen. looking for a way to "fix" this but not sure where to even start. Bonus: the production environment has the same thing, also 1 internal, 1 external domain & also showing occasional errors.
umbraco v 7.4.3
a part of the stacktrace:
Line 18 in Header.cshtml:
var targetGroups = currentsite.Children().Where(o => o.DocumentTypeAlias == "landingspagina").ToList() ;
--> currentSite is the current root/parent node. And there are always 8 children.it's basically the first line of code of the whole page that tries to fetch something from cache. If we publish the root node again all troubles are gone again.
it worries me that it's an issue on 1 domain but not on the other and they are both accessing the same database/filesystem/umbraco node.
The umbracoServer table only contains the domain which is not showing an error. But i guess they aren't both in there because they are located on the same server.
Have no idea on how to reproduce it but it happens every so often.
If anyone could shed some light on this, that would be awesome :)
Hi Gerty
Can you show please all code of header, specially how "currentsite" was created.
Maybe there is some issue.
Thanks,
Alex
Hi Alex,
There is always 1. The type we're on can only exist underneath 'site'. The other 8 children of currentsite are of the type 'landingspagina'.
Don't think it's code-related since it runs fine on the other domainname & if we publish the node again everything works fine again (for some time) on both domain names.
so setup is something like:
Looks like something with XML cache, really interesting issue.
I'm not sure it is. Wouldn't both url's give a problem then? Also worth noting that the rest of the site keeps functionning as usual.. Even though the header is on every single page...
That does sound strange... I noticed kind of a similar problem where the XML cache got corrupted when the IIS restarted at the same time as someone tried to publish something in Umbraco. Thats why I always set my Umbraco sites to recycle in the middle of the night instead of that horrendous default setting in IIS :P
But if the same component from another place can actually read the XML cache that doesn't seem to be the problem :/ Might be related tho... does seem to fix itself with a publish or restart and thats when the XML cache is rebuilt.
Might it be that the other places actually doesnt read from the XML cache if they are working?
is working on a reply...