Caching 第503页服务不可用

Caching 第503页服务不可用,caching,varnish,varnish-vcl,http-status-code-503,Caching,Varnish,Varnish Vcl,Http Status Code 503,我的清漆版本是3.0 当我卷曲URL时,我的服务器运行良好,但当使用varnish缓存时,它会偶尔返回503服务不可用 日志信息如下: 0 Debug - "VCL_error(200, OK)" 24 VCL_call c recv error 24 VCL_call c error deliver 24 SessionClose c error 0 Debug - "VCL_error(200, OK)" 27 VCL_call c rec

我的清漆版本是
3.0

当我卷曲URL时,我的服务器运行良好,但当使用varnish缓存时,它会偶尔返回
503服务不可用

日志信息如下:

0 Debug        - "VCL_error(200, OK)"
24 VCL_call     c recv error
24 VCL_call     c error deliver
24 SessionClose c error
0 Debug        - "VCL_error(200, OK)"
27 VCL_call     c recv error
27 VCL_call     c error deliver
27 SessionClose c error
0 Debug        - "VCL_error(200, OK)"
16 VCL_call     c recv error
16 VCL_call     c error deliver
16 SessionClose c error
14 Debug        - "Write error, retval = 2998272, len = 8465870, errno = Success"
0 Debug        - "VCL_error(200, OK)"
14 VCL_call     c recv error
14 VCL_call     c error deliver
14 SessionClose c error
0 Debug        - "VCL_error(200, OK)"
21 VCL_call     c recv error
21 VCL_call     c error deliver
21 SessionClose c error

PS:当我在浏览器上卷曲或键入URL时,服务器响应为200。

varnish 503可以通过以下步骤修复:

  • 增加后端设置中的
    连接超时
    。第一个字节超时
    。字节间超时

    backend default {
      .host = "www.example.com";
      .connect_timeout = 5s;
      .first_byte_timeout = 10s;
      .between_bytes_timeout = 10s;
    }
    
  • 启动清漆时,将参数增加到8192

    varnishd [options] http_resp_hdr_len=8192
    
  • 签出您的
    网络
    后端服务器

    如果步骤1和步骤2无法帮助您,请检查
    网络连接
    banckend服务器的可用性


  • VCL标签供delphi使用。请改用varnish vcl。也许这对其他人也有帮助:我的卷曲和清漆也有类似的问题。还得到了令人恼火的503和curl请求,而其余的响应正常。我的修正:从我的阅读中删除了“Content-Length”标题(因为我只是为了完成它),32位系统应该考虑上面的#2选项。另外,默认值似乎是8192?@barthoda,如果我猜的话,很可能是第一个字节超时。