简体   繁体   English

ImageResizer磁盘缓存System.IO.IOException

[英]ImageResizer diskcache System.IO.IOException

The following exception is logged in our application: 在我们的应用程序中记录了以下异常:

System.IO.IOException: Insufficient system resources exist to complete the requested service. System.IO.IOException:系统资源不足,无法完成请求的服务。 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.FlushOSBuffer() at System.IO.FileStream.Flush(Boolean flushToDisk) at ImageResizer.Plugins.DiskCache.CustomDiskCache.<>c__DisplayClass29_0.b__0() at ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(String key, Int32 timeoutMs, LockCallback success) at ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis, String extension, ResizeImageDelegate writeCallback, Int32 timeoutMs, Boolean asynchronous) at ImageResizer.Plugins.DiskCache.DiskCache.Process(IResponseArgs e) at ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext context, IResponseArgs e) at ImageResizer.InterceptModule.HandleRequest(HttpContext context, HttpModuleRequestAssistant ra, IVirtualFile vf) at ImageResizer.InterceptModule.CheckRequest_PostAuthorizeRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at S 在System.IO .__ Error.WinIOError(Int32 errorCode,String mayFullPath)在System.IO.FileStream.FlushOSBuffer()在System.IO.FileStream.Flush(Boolean flushToDisk)在ImageResizer.Plugins.DiskCache.CustomDiskCache。<> c__DisplayClass29_0。在ImageResizer.Plugins.DiskCache.CustomDiskCache.GetCachedFile(String keyBasis,字符串扩展,ResizeImageDelegate writeCallback,Int32 timeoutMs,布尔异步)处的ImageResizer.Plugins.DiskCache.LockProvider.TryExecute(字符串键,Int32超时Ms,LockCallback成功)处的b__0()在ImageResizer处的ImageResizer.Plugins.DiskCache.DiskCache.Process(HttpContext上下文,IResponseArgs e)在ImageResizer.InterceptModule.HandleRequest(HttpContext上下文,HttpModuleRequestAssistant ra,IVirtualFile vf)在ImageResizer。 S的System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()处的.CheckRequest_PostAuthorizeRequest(Object sender,EventArgs e) ystem.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ystem.Web.HttpApplication.ExecuteStepImpl(IExecutionStep步骤)在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值和完成同步)

We have a load balanced environment with two web servers using the same cache folder on a separate file server. 我们有一个负载平衡的环境,其中两个Web服务器在单独的文件服务器上使用相同的缓存文件夹。

Our diskcache configuration is like this: 我们的磁盘缓存配置如下:

<diskcache dir="~/imageresizercache" autoClean="true" hashModifiedDate="true" />

Any idea why we get this exception? 知道为什么我们会得到这个例外吗? Thanks, 谢谢,

Could you share the diagnostics page? 您可以共享诊断页面吗? /resizer.debug /resizer.debug

It sounds like there is a bottleneck connected to the shared file server. 似乎共享文件服务器存在瓶颈。 Generally it is best to disable autoClean if the cache files are not stored locally. 通常,如果缓存文件未存储在本地,则最好禁用autoClean。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM