【问题标题】:HAProxy - Does it cache the configuration fileHAProxy - 它是否缓存配置文件
【发布时间】:2020-05-02 13:15:48
【问题描述】:

我不确定这是否是发布此内容的正确位置。如果不是,请告诉我。

基本上,问题的标题是什么。我有一个 haproxy 配置文件,我试图将超时设置为 3600s。但是,文件似乎会随机恢复到以前的迭代,超时值要短得多。

我设置如下:

defaults
  log     global
  mode    http
  retries 3
  timeout client 3600s
  timeout connect 3600s
  timeout server 3600s
  option tcplog
  balance  roundrobin

listen admin
  bind 127.0.0.1:22002
  mode http
  stats enable
  stats show-node
  stats uri  /admin

listen  stats    :1936
  mode            http
  log             global

  maxconn 10

  timeout client 3600s
  timeout connect 3600s
  timeout server 3600s
  timeout queue   3600s

  stats enable
  stats hide-version
  stats show-node
  stats uri  /haproxy?stats

但是,它以某种方式更改为以下内容:

defaults
  log     global
  mode    http
  retries 3
  timeout client 50s
  timeout connect 5s
  timeout server 50s
  option tcplog
  balance  roundrobin

listen admin
  bind 127.0.0.1:22002
  mode http
  stats enable
  stats show-node
  stats uri  /admin

listen  stats    :1936
  mode            http
  log             global

  maxconn 10

  clitimeout      100s
  srvtimeout      100s
  contimeout      100s
  timeout queue   100s

  stats enable
  stats hide-version
  stats show-node
  stats uri  /haproxy?stats

我没有发现任何表明 haproxy 1.5 缓存了配置文件,但我需要调查所有可能性。简单地说:haproxy 中有什么东西会导致这种情况吗?

【问题讨论】:

    标签: configuration edit haproxy


    【解决方案1】:

    AFAIK,HAProxy 没有实现任何可以解释这种行为的东西。

    HAProxy 是如何安装的?你的操作系统是什么?

    如果你已经在你的服务器上进行了审核,你可以添加一条规则来观察哪个进程正在修改配置文件:

    auditctl -w /etc/haproxy/haproxy.conf -p wa
    

    然后注意/var/log/audit/audit.log 中的任何活动。

    删除审计:

        auditctl -W /etc/haproxy/haproxy.conf
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多