We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS 5 cache weirdnessRSS

24 replies

Last post Mar 07, 2007 11:54 PM by qbernard

  • IIS 5 cache weirdness

    Sep 29, 2006 03:57 AM|kirigoe|LINK

    Hi,

    We have a couple of IIS 5 webservers with a really weird bug we can't explain, whenever we update files, be it straight HTML files or JPEG's, it sometimes takes up to 1-2 minutes for the server to start serving the updated file. It's definitely server-related and not browser cache/proxy-related because it happens regardless of browser, even on the server console itself.
     

    If I just update a file and leave it be, it will serve the updated version within 30 seconds, but if I keep hitting refresh in the browser, it never starts serving the new file.

    There are no proxy servers or anything like it that could cause this either.

    Any ideas?

    /Daniel

  • Re: IIS 5 cache weirdness

    Sep 29, 2006 08:30 AM|tomkmvp|LINK

  • Re: IIS 5 cache weirdness

    Sep 29, 2006 08:39 AM|kirigoe|LINK

    [quote user="tomkmvp"]Is this it?
    http://support.microsoft.com/kb/329459/

     

    I'm afraid not, the server is fully patched. 

  • Re: IIS 5 cache weirdness

    Sep 30, 2006 11:47 PM|qbernard|LINK

    Keep hitting refresh button? Errr. that could be it - I mean the local IE cache within that short period of time... what's the status code of those requests when you keep hitting refresh? 304 ?
    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 02, 2006 08:05 AM|kirigoe|LINK

    I've disabled the cache in IE, tried Firefox and even wget that has no caching functions at all, it still returns the old file. Status codes show as 200 in the IIS logs and when running wget.
  • Re: IIS 5 cache weirdness

    Oct 03, 2006 04:03 AM|qbernard|LINK

    How about hitting ctrl-f5 in IE ?
    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 03, 2006 08:50 AM|tomkmvp|LINK

    Are the files stored locally on the web server?
  • Re: IIS 5 cache weirdness

    Oct 03, 2006 12:19 PM|kirigoe|LINK

    Yeah, all files are on the local drive
  • Re: IIS 5 cache weirdness

    Oct 03, 2006 12:22 PM|kirigoe|LINK

    [quote user="Bernard"]How about hitting ctrl-f5 in IE ?

    Makes no difference, it doesn't matter what client I use, the server just doesn't deliver the updated files 

  • Re: IIS 5 cache weirdness

    Oct 03, 2006 02:12 PM|tomkmvp|LINK

    Very strange.

    Just throwing shots in the dark here .. how about antivirus?  Could that be getting in the way?

  • Re: IIS 5 cache weirdness

    Oct 03, 2006 11:15 PM|qbernard|LINK

    How about accessing it via wfetch?
    HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
    http://support.microsoft.com/?id=284285
    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 03, 2006 11:16 PM|qbernard|LINK

    .

    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 05, 2006 02:48 AM|kirigoe|LINK

    There is no antivirus on the server, and if it were caused by something interfering with the updating of the file on disk, I guess it wouldn't be possible to open the file and see the changes.
  • Re: IIS 5 cache weirdness

    Oct 05, 2006 03:47 AM|kirigoe|LINK

    [quote user="Bernard"]How about accessing it via wfetch?
    HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
    http://support.microsoft.com/?id=284285

     

    here's the output after  changing the requested file on the server:

    started....
    Reusing existing connection (source port 2013)\nREQUEST: **************\nGET /webkit/OptiLine_update_of_70/offer/test.html HTTP/1.1\r\n
    Host: ut.xxxx.se\r\n
    Accept: */*\r\n
    \r\n
    RESPONSE: **************\nHTTP/1.1 200 OK\r\n
    Server: Microsoft-IIS/5.0\r\n
    X-Powered-By: ASP.NET\r\n
    Cache-Control: no-cache\r\n
    Date: Thu, 05 Oct 2006 06:43:10 GMT\r\n
    Content-Type: text/html\r\n
    Accept-Ranges: bytes\r\n
    Last-Modified: Thu, 05 Oct 2006 06:43:07 GMT\r\n
    ETag: W/"eaf1468449e8c61:d8d"\r\n
    Content-Length: 33\r\n
    \r\n
    <html>\r\n
    \ttest 1234567890\r\n
    </html>
    finished.

    all requests looks like that, doesn't seem weird to me.

    i guess this is reason enough to reinstall the server to win2k3 :( 

  • Re: IIS 5 cache weirdness

    Oct 09, 2006 12:12 AM|qbernard|LINK

    So you mean even you updated test.html, it still shows the old content?

    even after you change to test. 444444444444 ?   with the last modfied date matching your new file modified time?

    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 09, 2006 08:33 AM|kirigoe|LINK

    [quote user="Bernard"]

    So you mean even you updated test.html, it still shows the old content?

    even after you change to test. 444444444444 ?   with the last modfied date matching your new file modified time?


    it shows the old file content and old modified date until after a few minutes when the new data show up. this is three requests after eachother, first one with no changes, second after changing the file, and third request after the new file is actually being served. i still don't see any weird things going on there.

     

    started....
    WWWConnect::Connect("ut.xxx.se","80")\n
    IP = "172.20.50.40:80"\n
    source port: 2824\r\n
    REQUEST: **************\n
    GET /webkit/update_of_70/offer/test.html HTTP/1.1\r\n
    Host: ut.xxx.se\r\n
    Accept: */*\r\n
    \r\n
    RESPONSE: **************\n
    HTTP/1.1 200 OK\r\n
    Server: Microsoft-IIS/5.0\r\n
    X-Powered-By: ASP.NET\r\n
    Cache-Control: no-cache\r\n
    Date: Mon, 09 Oct 2006 12:26:15 GMT\r\n
    Content-Type: text/html\r\n
    Accept-Ranges: bytes\r\n
    Last-Modified: Mon, 09 Oct 2006 12:24:33 GMT\r\n
    ETag: "324d9ee09debc61:d8f"\r\n
    Content-Length: 30\r\n
    \r\n
    <html>\r\n
    \ttest 1234567\r\n
    </html>
    WWWConnect::Close("ut.xxx.se","80")\n
    closed source port: 2824\r\n
    finished.


    started....
    WWWConnect::Connect("ut.xxx.se","80")\n
    IP = "172.20.50.40:80"\n
    source port: 2857\r\n
    REQUEST: **************\n
    GET /webkit/update_of_70/offer/test.html HTTP/1.1\r\n
    Host: ut.xxx.se\r\n
    Accept: */*\r\n
    \r\n
    RESPONSE: **************\n
    HTTP/1.1 200 OK\r\n
    Server: Microsoft-IIS/5.0\r\n
    X-Powered-By: ASP.NET\r\n
    Cache-Control: no-cache\r\n
    Date: Mon, 09 Oct 2006 12:26:26 GMT\r\n
    Content-Type: text/html\r\n
    Accept-Ranges: bytes\r\n
    Last-Modified: Mon, 09 Oct 2006 12:24:33 GMT\r\n
    ETag: "324d9ee09debc61:d8f"\r\n
    Content-Length: 30\r\n
    \r\n
    <html>\r\n
    \ttest 1234567\r\n
    </html>
    WWWConnect::Close("ut.xxx.se","80")\n
    closed source port: 2857\r\n
    finished.


    started....
    WWWConnect::Connect("ut.xxx.se","80")\n
    IP = "172.20.50.40:80"\n
    source port: 2996\r\n
    REQUEST: **************\n
    GET /webkit/update_of_70/offer/test.html HTTP/1.1\r\n
    Host: ut.xxx.se\r\n
    Accept: */*\r\n
    \r\n
    RESPONSE: **************\n
    HTTP/1.1 200 OK\r\n
    Server: Microsoft-IIS/5.0\r\n
    X-Powered-By: ASP.NET\r\n
    Cache-Control: no-cache\r\n
    Date: Mon, 09 Oct 2006 12:27:22 GMT\r\n
    Content-Type: text/html\r\n
    Accept-Ranges: bytes\r\n
    Last-Modified: Mon, 09 Oct 2006 12:26:22 GMT\r\n
    ETag: "497298219eebc61:d8f"\r\n
    Content-Length: 33\r\n
    \r\n
    <html>\r\n
    \ttest 1234567890\r\n
    </html>
    WWWConnect::Close("ut.xxx.se","80")\n
    closed source port: 2996\r\n
    finished.

     

  • Re: IIS 5 cache weirdness

    Oct 10, 2006 03:40 AM|qbernard|LINK

    so it does shows the new content! from your log date is showing new content is refreshed within 1 min. It is working, right?

     

    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Oct 10, 2006 04:06 AM|kirigoe|LINK

    [quote user="Bernard"]

    so it does shows the new content! from your log date is showing new content is refreshed within 1 min. It is working, right?

    it does update the file eventually, sure, but our web developers can't wait a minute, sometimes more, to see the changes. this applies to all kinds of files, images too. 

  • Re: IIS 5 cache weirdness

    Oct 11, 2006 11:24 AM|msdotnetfreak|LINK

    How about you trying this??

    http://support.microsoft.com/kb/311006/en-us

  • Re: IIS 5 cache weirdness

    Oct 25, 2006 09:36 AM|kirigoe|LINK

    content expiration isn't enabled on the affected sites and i'm guessing without it enabled there should be no caching of files of any sort?
  • Re: IIS 5 cache weirdness

    Oct 26, 2006 12:17 AM|qbernard|LINK

    From what I see - IIS is picking up the new files, and I can't repro it anyway.
    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Mar 06, 2007 04:31 AM|kirigoe|LINK

    the solution if anyone is interested:

    After opening a support case with Microsoft, I've activated a DisableMemoryCache registry setting and the problem goes away. I find it a little odd that this is required since Microsoft's paper on Web Server Tuning with IIS5 states that:

    Make sure that this parameter is set to 0 on all production servers. If this parameter is set to 1, static file caching will be disabled. While this may be useful during debugging, disabling caching can severely compromise production server performance. This parameter cannot be configured by using the IIS snap-in.


     

  • Re: IIS 5 cache weirdness

    Mar 06, 2007 04:52 AM|qbernard|LINK

    This is not really acceptable as by setting this nothing will be cached, and it will impact system performance if it's a heavy loaded site.

     

    Cheers,
    Bernard Cheah
  • Re: IIS 5 cache weirdness

    Mar 07, 2007 10:22 AM|kirigoe|LINK

    I've been questioning it too, do you think that I should not let them close the support case without another solution? The german support technician I've been talking to has been kind of flaky, at first he suggested that it was a network card problem since a "ping localhost" on the server gave a "<10ms" reply, even though this is how all our windows 2000 servers work. It seems to me that he just wants to close this case and forget about it.
  • Re: IIS 5 cache weirdness

    Mar 07, 2007 11:54 PM|qbernard|LINK

    If I'm pay for 250USD for it, I will not accept :)
    Cheers,
    Bernard Cheah