gpt4 book ai didi

caching - Varnish 503 服务不可用

转载 作者:行者123 更新时间:2023-12-02 11:19:11 26 4
gpt4 key购买 nike

我的 Varnish 版本是3.0

当我 curl 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:当我在浏览器上 curl 或键入网址时,服务器响应 200。

最佳答案

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

  1. 增加后端设置中的 connect_timeout.first_byte_timeout. Between_bytes_timeout:

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

    varnishd [options] http_resp_hdr_len=8192
  3. 检查您的网络后端服务器

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

关于caching - Varnish 503 服务不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13042571/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com