1

我刚刚开始在我的应用程序前尝试使用 HA 代理进行热故障转移。我注意到它在从 Web 客户端打开到服务器大约 10 分钟后关闭了一个 Websocket。

如何禁用超时以保持 websocket 处于打开状态?我可以确认两个盒子确实一直都在。谢谢。

4

1 回答 1

7

You need to change "timeout server" and "timeout client" to fit your needs. You must never ever run without timeouts, because from time to time you'll have some users disconnect from the net, and these fantom connections will slowly accumulate until you have to restart haproxy, which makes no sense. Better use large timeouts (eg: one day).

于 2012-05-11T06:57:59.210 回答