歡迎您光臨本站 註冊首頁

請教 squid 返回頭中包含 "Revalidation failed" 的問題

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

請教 squid 返回頭中包含 "Revalidation failed" 的問題

後端是 nginx 不管IE 還是FIREFOX CHROME 請求都會返回

Warning:110 squid/3.1.12.3 "Response is stale"
111 squid/3.1.12.3 "Revalidation failed"


Request URL:http://centos.site.com/news/shipin/20110660.html
Request Method:GET
Status Code:200 OK
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Cookie:PHPSESSID=u6d81clh0445c5pol5c5incda5
Host:centos.advtan.com
User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30
------------------------------------------------------------------------------------------------------------------------------------------------------
Response Headers
Connection:close
Content-Encoding:gzip
Content-Type:text/html
Date:Sat, 25 Jun 2011 04:08:07 GMT
Last-Modified:Sat, 25 Jun 2011 03:32:44 GMT
Server:nginx
Via:1.0 localhost.localdomain (squid/3.1.12.3)
Warning:110 squid/3.1.12.3 "Response is stale"
111 squid/3.1.12.3 "Revalidation failed"
X-Cache:HIT from localhost.localdomain

squid 日誌
1308974887.879     33 192.168.1.128 TCP_REFRESH_UNMODIFIED/200 6645 GET http://centos.site.com/news/shipin/20110660.html - FIRST_UP_PARENT/nginx text/html

查了很長時間,找不到相關資料,只能來請教下大家如何解決了
《解決方案》

找到加入這個警告的代碼部分了:

squid-3.1.12.3\src\client_side_reply.cc
line 1330:

    // add Warnings required by RFC 2616 if serving a stale hit
    if (http->request->flags.stale_if_hit && logTypeIsATcpHit(http->logType)) {
        hdr->putWarning(110, "Response is stale");
        if (http->request->flags.need_validation)
            hdr->putWarning(111, "Revalidation failed");
    }

不過不太理解。。。

[火星人 ] 請教 squid 返回頭中包含 "Revalidation failed" 的問題已經有518次圍觀

http://coctec.com/docs/service/show-post-2186.html