3

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 :-)

2 Answers 2

0

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:

machine.config:

<configuration>
...  
   <system.web>  
    ...  
      <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
1
  • 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, 2011 at 13:14
0

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

1
  • 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, 2011 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .