We're having a few issues with our image server.

It's a Win 2008 running IIS 7.5 and it only serves static content: images.

It has run without issues for quite a while, until recently when we disabled Output Caching, as we noticed having it enabled meant it sent no-cache host-headers to the clients (forcing them to fetch the images from the server every time)

We've read quite a bit about it, and it seems IIS just works that way - either you use Output Caching or you get to use cache host-headers.

Anyway having disabled the Output Cache, we now experience random 5 minutes intervals, where all requests just get a 503 Service Unavailable. During this period the "Files cached" performance counter staggers (neither increased nor decreased) and after the period all caches are flushed.

You might find it weird I talk about caching, since we disabled Output Caching.

The thing is we changed the ObjectTTL parameter in registry, so we cache files for 3 minutes (which has worked very well, our Disk I/O dropped significantly)

So even with Output Caching disabled, we're still caching plenty of files - if we could just get rid of the random 503 it'd be perfect :-D

We don't get any messages in the Windows event log during these 503 intervals, so we're pretty stumped as to what to do.

Any ideas are very welcome :-)


Maybe the problem are the RequestQueue/ConcurrentRequest limits. Consider the settings of the accepted answer on this Stack Overflow question:

IIS 7.0 503 errors with generic handler (.ashx) implementing IHttpAsyncHandler

To eliminate the 503 errors required 3 different config changes:


      <processModel enable="true" requestQueueLimit="100000"/>

IIS Manager > ApplicationPools > Advanced Settings

Queue Length : 65535

and finally (the missing piece of the puzzle), the command line:

appcmd.exe set config /section:serverRuntime /appConcurrent
  • That may be it, however we're only serving jpg files, so somehow I doubt it's involved in the application pool. – Steffen Mar 2 '11 at 13:14

We finally solved the issue.

It was apparently caused by IIS checking for web.config changes in subdirectories.

By setting allowSubDirConfig="false" in our applicationhost.config file, the problem stopped.

This is somewhat weird though, as we haven't got any more than 1 web.config file, and it's in the root of the project - still if it works, why complain :-D

  • Just a note: pretty sure Output Caching supports the use of cache profiles, which can be used to specify a cache location for a particular content type. If you look at Configuration Editor for System.webServer/httpCaching, you can probably find the settings you need. – TristanK Mar 21 '11 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.