日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

rabbitmq 集群 ha负载 Consumer raised exception, processing can restart if the connection factory

發布時間:2024/9/27 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 rabbitmq 集群 ha负载 Consumer raised exception, processing can restart if the connection factory 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

情況是醬紫滴

線上有一個rabbitmq 集群,一臺磁盤模式的 兩臺內存模式的. 使用erlang 做cookie 做同步.haproxy做負載

在連接一會后 程序拋出異常 Consumer raised exception, processing can restart if the connection factory

原因是因為ha 在做負載的時候 設置玩tcp連接后 還需要把默認的 timeout server 和 timeout client 注釋掉.

這樣ha就不會自動的關閉mq的tcp 長連接了

華麗的分割線_____________________________________________________________________

global
log 127.0.0.1 local3
maxconn 65535 #這里可以改大一些 增加擴容
chroot /usr/local/haproxy
uid nobody
gid nobody
daemon
nbproc 1
pidfile /usr/local/haproxy/haproxy.pid
#debug
#tune.ssl.default-dh-param 2048

defaults
log 127.0.0.1 local3
#mode tcp
option tcplog
#option http-server-close
option dontlognull
option forwardfor
option redispatch
retries 2
maxconn 3000 #這里可以改大一些 增加擴容
timeout connect 5000
#timeout client 100000 將此行注釋
#timeout server 100000 將此行注釋

listen web_ha
bind 0.0.0.0:9999
mode http
transparent
stats refresh 30s
stats uri /haproxy-stats
stats hide-version
stats realm Haproxy\statistics
stats auth :*

listen rabbitmq_cluster 0.0.0.0:5670
mode tcp
option tcplog
option tcpka #允許發送tcp 長連接
log global
balance roundrobin
#cookie rabbit insert indirect nocache
#server rabbitmq-1 192.168.8.114:5672 weight 2 check inter 2000 rise 1 fall 5
server rabbitmq-2 192.168.8.115:5672 check inter 5000
server rabbitmq-3 192.168.8.116:5672 check inter 5000

總結

以上是生活随笔為你收集整理的rabbitmq 集群 ha负载 Consumer raised exception, processing can restart if the connection factory的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。