Umbraco:Azure Web Apps上的意外网络错误

Rac*_*hel 8 umbraco azure azure-web-sites umbraco7

我们在Azure Web Apps上托管了一个Umbraco网站(版本7.5.11).

我们间歇性地经历以下异常(在过去3周内3次).一旦发生异常,它会将网站关闭,直到我们重新发布Umbraco中的主节点.在其他所有时间,网站都按预期工作,包括从服务器检索图像文件.

异常类型:IOException

异常消息:发生意外的网络错误.at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey,Func1 getCacheItem,Nullable1 timeout,Boolean isSliding,CacheItemPriority priority,CacheItemRemovedCallback removedCallback,CacheDependency依赖),位于Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey,Func1 getCacheItem,Nullable1 timeout,Boolean isSliding,CacheItemPriority priority,CacheItemRemovedCallback removedCallback,String [] dependentFiles)at Umbraco.Core.Cache.DeepCloneRuntimeCacheProvider.GetCacheItem(String cacheKey,Func1 getCacheItem,Nullable1 timeout,Boolean isSliding,CacheItemPriority priority,CacheItemRemovedCallback removedCallback,String [] dependentFiles) at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetCacheValues(Int32 id,Func2 func)at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id)at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetById(UmbracoContext umbracoConte)xt,布尔预览,Int32 nodeId)Umbraco.Web.PublishedCache.ContextualPublishedCache1.GetById(布尔预览,Int32 contentId)在Umbraco.Web.PublishedContentQuery.DocumentById(Int32 id,ContextualPublishedCache缓存,Object ifNotFound)位于Umbraco.Web.PublishedContentQuery. Umbraco.Web.UmbracoHelper.Media(String id)的Media(Int32 id)

媒体文件存在,重新发布主节点使网站重新联机.

在异常时,没有部署代码更改,并且在Umbraco中没有更新/发布页面.

有没有人经历过类似的事情或任何想法的根本原因是什么?

Amo*_*mor 9

根据PublishedMediaCache.cs的源代码,异常通常是由以下问题引起的.

检查索引已损坏.

这是umbraco论坛上与您的问题相关的帖子.

检查腐败问题

这里是解决方案从@Shannon Deminick这个问题.

如果您使用的是Azure网络应用程序而不是自动缩放,则应使用以下设置:

  1. useTempStorage = "同步"
  2. 使用此功能存储本地索引文件:http://issues.umbraco.org/issue/U4-7614
  3. 从索引路径中删除{machinename}标记
  4. RebuildOnAppStart ="true" - 因为这应该只发生一次

如果您正在使用Azure Web应用程序并且负载平衡w /自动扩展您的前端工作人员,那么:

  1. useTempStorage = "同步"
  2. 使用此功能存储本地索引文件:http://issues.umbraco.org/issue/U4-7614
  3. 您必须拥有索引路径中的{machinename}标记
  4. RebuildOnAppStart ="true" - 这样当新网站上线时,他们的索引就会建立起来
  5. ...是的,在某些情况下这可能不太理想,请参阅:https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/74731-examine-corruption-issues#comment- 244293