【发布时间】:2016-01-02 22:59:21
【问题描述】:
我的 php 应用程序工作正常,但有时我得到了
504 Gateway Time-out 服务器没有及时响应。
即使我重新启动应用程序,我也无法摆脱这个问题。
haproxy 日志:
[WARNING] 001/175903 (47931) : Server express/local-gear is DOWN, reason: Layer4 timeout, check duration: 2000ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 001/175903 (47931) : proxy 'express' has no server available!
[WARNING] 001/175933 (47931) : Server express/local-gear is UP, reason: Layer7 check passed, code: 302, info: "HTTP status check returned code <3C>302<3E>", check duration: 9ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
[WARNING] 001/180043 (47931) : Server express/local-gear is DOWN, reason: Layer4 timeout, check duration: 2001ms. 0 active and 0 backup servers left. 1 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 001/180043 (47931) : proxy 'express' has no server available!
[WARNING] 001/180113 (47931) : Server express/local-gear is UP, reason: Layer7 check passed, code: 302, info: "HTTP status check returned code <3C>302<3E>", check duration: 19ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
我在互联网上找到的解决方案是在haproxy.cfg option httpchk GET 中进行更改,但不知道我到底应该做什么。
我的应用程序位于@/app-root/repo/php 文件夹那里我有 index.php 我也有 api 文件夹来访问我的应用程序 api。
【问题讨论】: