我向我的后端发出请求,比如说:
curl 'www.epocacosmeticos.com.br/api/vtexid/pub/authentication/oauth/redirect?authenticationToken=dbaf4496-a35f-4393-b2aa-66c633cd91cc&providerName=Google' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Referer: http://www.epocacosmeticos.com.br/login?ReturnUrl=%2faccount%2forders' -H 'Cookie: ISSMB=ScreenMedia%3d0%26UserAcceptMobile%3dFalse; VtexRCMacIdv7=81ee3f61-9b15-11e3-b4b2-9f1bfd993f63; VtexRCRequestCounter=1; VtexRCSessionIdv7=1%253A81ee1850-9b15-11e3-b4b2-9f1bfd993f63; _ga=GA1.3.138072997.1393000243; __utma=226091982.138072997.1393000243.1393000244.1393000244.1; __utmb=226091982.2.9.1393000244; __utmc=226091982; __utmz=226091982.1393000244.1.1.utmcsr%3d(direct)%7cutmccn%3d(direct)%7cutmcmd%3d(none); __bid=82ba78fa-9b15-11e3-855b-0050568438b8-1393000243982-99785454268; __vnr=1; __butms=e69.; __cip=eyJ7bmR%2526%2524m%2526%253B%2524WQi-n%253AiaS!3!nV%253B%2524GVmaW4%2526%2524CJ1fQ..; __pnr=1; __vid=82ba78fa-9b15-11e3-855b-0050568438b8-1393000243982-99785454268; __uor=http%253A%252F%252Fwww.epocacosmeticos.com.br%252F; SGTS=IndiceSegmentoHashCookie%3d1045D4DA0B960F9A25D39084CD6025D6; checkout.vtex.com=__ofid%3d1690a434781a438484df3bb6a15185ce; .ASPXAUTH=85FF63271A0620AB22B47E562CB09392DE69480960F7C4E446BF49E398D71C6D8C07700086D64F79764C020DC9D7DF3157F2940D885A580A107319AF1AC4693EB049F22010F4730A9C383077CF78F35E2E67F8848F7AF30603D68E7460197F92F3AC39A9F56E9F50E7C4DBEC682B44F57AFD11BB23D58FB0028858B4328527D27EC66EA288EFC325195CF865FDC8F77301F066817B185751A2F0E34FF7A6808D03C53EB2688BEA6BDD15EE4DBC41A5D2C0C14E6A9E81130C3DB4400B95F968E952165853; nav22278=9173723934_121; i18next=pt-BR; ISSMB=ScreenMedia=0&UserAcceptMobile=False; nav22278=9173723934_121; .ASPXAUTH=54B8EBA0CEA119D0480D20FB8F08F9BDB895EA7910195E0EB55DFCF1FF94CC1096CC536152930FB06F0CE302BE04159E54BD87E4896D8028C0224E5EBFA9EF28056A32056A7F03D5F374E6FC507D4C9EFA03238D95C763BC6322436857C865B2BF27DC19FE4B63099D1DC2C5A2FBFF04F16D6F2D093340CE3BF7AD3EFAC11589FFD02BDD2D88695BE0D088EFA82EFA8A89DE72AD5376AD8EF05043A5D73F5E8473D60A1230B70ACC5B0FD8A6EF0D50038E1D8C15A450181B720A5F10D17A8CA3438BDC7B; __bid=e2ccd23c-9b1b-11e3-8cca-0050568438b8-1393002980892-20482039195; __vnr=1; SGTS=IndiceSegmentoHashCookie=1045D4DA0B960F9A25D39084CD6025D6; VtexRCSessionIdv7=1%3A4ff8f970-9b2c-11e3-9972-21a9f9abb2ac; VtexRCMacIdv7=e0d1b970-9b1b-11e3-9aa8-21696aee4194; VtexRCRequestCounter=4; _ga=GA1.3.1993338433.1393002979; __utma=226091982.1993338433.1393002979.1393002981.1393010038.2; __utmb=226091982.8.9.1393010047697; __utmc=226091982; __utmz=226091982.1393002981.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __butms=e69.; __pnr=1; __vid=e2ccd23c-9b1b-11e3-8cca-0050568438b8-1393002980892-20482039195; __uor=http%3A%2F%2Fwww.epocacosmeticos.com.br%2Fthat-girl; __cip=eyJ7bmR%26%24m%26%3B%24WQi-n%3AiaS!3!nV%3B%24GVmaW4%26%24CJ1fQ..; checkout.vtex.com=__ofid=7f8daa695f154f8e8e3c4fe7cf132124; i18next=pt-BR' -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' --compressed --verbose
然后我得到了这个回复(以及其他人的'set-cookie'):
连接:保持活力
缓存控制:max-age = 0
HTTP / 1.1 301永久移动
Access-Control-Allow-Headers:Origin,X-Requested-With,
Content-Type,Accept Access-Control-Allow-Origin:*
缓存控制:无缓存
日期:2014年2月21日星期五19:23:17 GMT
过期:-1
Pragma:no-cache
服务器:Microsoft-IIS / 8.0
服务器:Microsoft-IIS / 8.0
内容长度:0
连接:保持活力
现在我将DNS指向一个全新的清漆副本,由VCL上的单个后端(上面的那个)定义。同样的请求使清漆抛出503:
连接:保持活力
缓存控制:max-age = 0
HTTP / 1.1 503服务不可用
服务器:清漆
Content-Type:text / html;字符集= UTF-8
重试 - 之后:5
内容长度:419
Accept-Ranges:bytes
日期:2014年2月21日星期五19:43:11 GMT
X-Varnish:1045156151
年龄:0
Via:1.1 varnish
连接:关闭
在varnishlog上我看到了:
11 SessionOpen c 127.0.0.1 59882:80
11 ReqStart c 127.0.0.1 59882 1045156151
11 RxRequest c GET
11 RxURL c / api / vtexid / pub / authentication / oauth / redirect?authenticationToken = e0f98a75-5f82-41c3-8951-bbc51076ea3f& providerName = Google
11 RxProtocol c HTTP / 1.1
11 RxHeader c主持人:www.epocacosmeticos.com.br
11 RxHeader c Accept-Encoding:gzip,deflate,sdch
11 RxHeader c Accept-Language:pt-BR,pt; q = 0.8,en-US; q = 0.6,en; q = 0.4
11 RxHeader c用户代理:Mozilla / 5.0(X11; Linux x86_64)AppleWebKit / 537.36(KHTML,与Gecko一样)Chrome / 32.0.1700.107 Safari / 537.36
11 RxHeader c接受:text / html,application / xhtml + xml,application / xml; q = 0.9,image / webp, / ; q = 0.8
11 RxHeader c Referer:http://www.epocacosmeticos.com.br/login?ReturnUrl=%2faccount%2forders
11 RxHeader c Cookie:ISSMB = ScreenMedia%3d0%26UserAcceptMobile%3dFalse; VtexRCMacIdv7 = 81ee3f61-9b15-11e3-b4b2-9f1bfd993f63; VtexRCRequestCounter = 1; VtexRCSessionIdv7 = 1%253A81ee1850-9b15-11e3-b4b2-9f1bfd993f63; _ga = GA1.3.138072997.1393000243; __utma = 226091982.138072997。 11 RxHeader c连接:keep-alive
11 RxHeader c Cache-Control:max-age = 0
11 VCL_call c recv pass
11 VCL_call c hash
11哈希c / api / vtexid / pub / authentication / oauth / redirect?authenticationToken = e0f98a75-5f82-41c3-8951-bbc51076ea3f& providerName = Google
11 Hash c www.epocacosmeticos.com.br
11 VCL_return c hash
11 VCL_call c传球
11后端c 13 prodbackend prodbackend
11 FetchError c http格式错误
11 VCL_call c错误传递
11 VCL_call c交付
11 TxProtocol c HTTP / 1.1
11 TxStatus c 503
11 TxResponse c服务不可用
11 TxHeader c Server:Varnish
11 TxHeader c Content-Type:text / html;字符集= UTF-8
11 TxHeader c Retry-After:5
11 TxHeader c内容长度:419
11 TxHeader c Accept-Ranges:bytes
11 TxHeader c日期:2014年2月21日星期五19:43:11 GMT
11 TxHeader c X-Varnish:1045156151
11 TxHeader c年龄:0
11 TxHeader c Via:1.1 varnish
11 TxHeader c连接:关闭
11长度c 419
11 ReqEnd c 1045156151 1393011791.083344221 1393011791.505552292 0.000167608 0.422099590 0.000108480
11 SessionClose c error
11 StatSess c 127.0.0.1 59882 0 1 1 0 1 0 257 419
有没有人知道为什么清漆决定抛出503?从后端获取时,似乎响应有“http格式错误”...可能后端响应的哪一部分我必须修复以改善清漆的情绪? (在3.0.4和3.0.5上测试)
答案 0 :(得分:3)
varnish上的配置限制了它在后端响应时可以收到的标头数量:http_max_hdr
我通过参数-p http_max_hdr=128