我有一个向 RabbitMQ 发送消息的 API。
我在 HAProxy 后面有一个高可用性 RabbitMQ 集群。
当我对 API 进行负载测试时,我开始看到很多这样的内容:
Recovering from a network failure...
Exception in the reader loop: AMQ::Protocol::EmptyResponseError: Empty response received from the server.
在我的独角兽日志中。
如果我通过 haproxy 直接连接到 RabbitMQ,我不会。我哪里出错了,我的 haproxy 配置如下所示:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy
defaults
log global
mode http
retries 3
timeout client 50s
timeout connect 10s
timeout server 50s
option dontlognull
option forwardfor
option httplog
option redispatch …
Run Code Online (Sandbox Code Playgroud)