简体   繁体   中英

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. 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 ystem.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We have a load balanced environment with two web servers using the same cache folder on a separate file server.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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