大网数据广告活动
服务器运维问答

HAProxy served 503s and I don't know why

· 52CE 我爱测

Yesterday, for around 10 minutes, my haproxy served a lot of 503 pages (directly from errorfile 503 /etc/haproxy/errors/503.http ) and I don't know why. I have no health checks to my backends, so for sure these were not marked as…

问题原文

原帖链接 · cherouvim · CC BY-SA 3.0

Yesterday, for around 10 minutes, my haproxy served a lot of 503 pages (directly from errorfile 503 /etc/haproxy/errors/503.http) and I don't know why. I have no health checks to my backends, so for sure these were not marked as disabled. The stats page doesn't show that a limit was reached (in the marked red areas).

global
    maxconn 20000
    tune.ssl.default-dh-param 2048
    daemon
    ...

defaults
    log     global
    mode    http
    timeout http-request 30s
    option  httplog
    option  dontlognull
    timeout connect 5s
    timeout server 120s
    timeout client 30s
    ...

frontend frontend_for_all_sites
    maxconn 20000
    mode http
    bind *:80

    option http-buffer-request
    timeout http-request 30s

    ...

    use_backend www_backend      if acl_hostname_www
    use_backend static_backend   if acl_hostname_static

backend www_backend
    option forwardfor
    server www localhost:9090 maxconn 5000

backend static_backend
    option forwardfor
    server s localhost:9090 maxconn 5000

Where should I look at next to figure out why did that happen?

已采纳解答

原帖链接 · cherouvim · CC BY-SA 3.0

It was the backend, and I managed to point out what was happening after adding a %ts (termination_state) in the log-format so I could validate that indeed the backend was unavailable.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-03-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。