客户端访问网页时提示 timeout(或 503 Server Unavailable)超时.note

noteId: WEBa7d0ba6d571f80d7c75d625525cc96c1 · 原始路径:/ALL/1-排错笔记/A模块/HAproxy/客户端访问网页时提示 timeout(或 503 Server Unavailable)超时.note · 图片:2 · 附件待处理:0

 
 
# 问题:客户端访问网页时提示timeout超时,但是在任何节点用 curl访问都是正常的
 
# 原因:新版本的 haproxy的“timeout client/server 和 time connect”的时间太短了(尤其是访问 php页面,如wordpress时),页面有时需要较长时间响应,因此我们需要在配置文件中手动将其改长
## timeout client/server改为90s较好
## timeout connect 改为10s(因为有时题目可能会有fail2ban,时间设置太长会等待过久,太短又容易超时)
 
模板中默认值: