"This document is published but is not in the cache" when publish huge count of pages
Here is what I got in backoffice:
And in the logs:
2020-03-16 18:45:38,711 [P11552/D4/T17] INFO Umbraco.Core.Publishing.PublishingStrategy - Content '457102' with Id '26634' has been published.
2020-03-16 18:45:54,479 [P11552/D4/T17] WARN Umbraco.Web.PublishedCache.XmlPublishedCache.XmlCacheFilePersister - Cannot write now because we are going down, changes may be lost.
2020-03-16 18:45:54,479 [P11552/D4/T17] ERROR UmbracoExamine.DataServices.UmbracoLogService - Provider=InternalIndexer, NodeId=-1
System.Exception: App is shutting down so index batch operation is ignored,, IndexSet: InternalIndexSet
It happens while a huge count of pages (tousands) publishing programaticaly like that:
// the page may have 1-3к descendants
СontentService.PublishWithChildrenWithStatus(page, 0, true);
How to fix that issue? I know it can be fixed by republish entire site, but I need to prevent it before.
P.S.
Umbraco 7.14.0, Windows 10, IIS Express on local machine
"This document is published but is not in the cache" when publish huge count of pages
Here is what I got in backoffice:
And in the logs:
It happens while a huge count of pages (tousands) publishing programaticaly like that:
How to fix that issue? I know it can be fixed by republish entire site, but I need to prevent it before.
P.S.
Umbraco 7.14.0, Windows 10, IIS Express on local machine
For everyone who googled that :)
I noticed that I use multiple instances of
ContentService
, so I suppose it locks each other while trying to access xml cache.All have done it use a single instance of ContentService like
ApplicationContext.Current.Services.ContentService
is working on a reply...