locked
IIS 5 cache weirdness RRS feed

  • Question

  • User1942048129 posted

    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

    Friday, September 29, 2006 3:57 AM

All replies

  • User-823196590 posted
    Is this it?
    http://support.microsoft.com/kb/329459/
    Friday, September 29, 2006 8:30 AM
  • User1942048129 posted

     

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

    Friday, September 29, 2006 8:39 AM
  • User989702501 posted
    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 ?
    Saturday, September 30, 2006 11:47 PM
  • User1942048129 posted
    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.
    Monday, October 2, 2006 8:05 AM
  • User989702501 posted
    How about hitting ctrl-f5 in IE ?
    Tuesday, October 3, 2006 4:03 AM
  • User-823196590 posted
    Are the files stored locally on the web server?
    Tuesday, October 3, 2006 8:50 AM
  • User1942048129 posted
    Yeah, all files are on the local drive
    Tuesday, October 3, 2006 12:19 PM
  • User1942048129 posted

    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 

    Tuesday, October 3, 2006 12:22 PM
  • User-823196590 posted

    Very strange.

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

    Tuesday, October 3, 2006 2:12 PM
  • User989702501 posted
    How about accessing it via wfetch?
    HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
    http://support.microsoft.com/?id=284285
    Tuesday, October 3, 2006 11:15 PM
  • User989702501 posted

    .

    Tuesday, October 3, 2006 11:16 PM
  • User1942048129 posted
    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.
    Thursday, October 5, 2006 2:48 AM
  • User1942048129 posted

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

    Thursday, October 5, 2006 3:47 AM
  • User989702501 posted

    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?

    Monday, October 9, 2006 12:12 AM
  • User1942048129 posted

    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.

     

    Monday, October 9, 2006 8:33 AM
  • User989702501 posted

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

     

    Tuesday, October 10, 2006 3:40 AM
  • User1942048129 posted

    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. 

    Tuesday, October 10, 2006 4:06 AM
  • User-902901328 posted

    How about you trying this??

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

    Wednesday, October 11, 2006 11:24 AM
  • User1942048129 posted
    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?
    Wednesday, October 25, 2006 9:36 AM
  • User989702501 posted
    From what I see - IIS is picking up the new files, and I can't repro it anyway.
    Thursday, October 26, 2006 12:17 AM
  • User1942048129 posted

    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.


     

    Tuesday, March 6, 2007 4:31 AM
  • User989702501 posted

    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.

     

    Tuesday, March 6, 2007 4:52 AM
  • User1942048129 posted
    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.
    Wednesday, March 7, 2007 10:22 AM
  • User989702501 posted
    If I'm pay for 250USD for it, I will not accept :)
    Wednesday, March 7, 2007 11:54 PM