0
votes

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 System.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,

1
That is a very unusual mishap, never seen it before. The underlying OS call (FlushFileBuffers) does not have a lot of good reasons to run out of memory. Do suspect an anti-malware product being anti. And keep an eye on the OS kernel memory pool statistics, this is not cheap code and having too many clients hitting your web sever at the same time does have a knack for bringing it to its knees. Consider a static Semaphore to limit the number of concurrent calls.Hans Passant

1 Answers

0
votes

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.