首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
comet http长链接场景下, nginx启用反向代理情况下 /sub报502 Bad Gateway
韩哥,你好,在comet http长链接场景下, nginx启用反向代理情况下, htt://testkf.xxx.com:9527/sub firefox浏览器报502 Bad Gateway 会是什么原因 下面两个正常,能正常返回json格式结果,运行的代码是案例:/matyhtf/php-webim htt://testkf.xxx.com:9527/connect htt://testkf.xxx.com:9527/pub upstream proxy_comet { server 127.0.0.1:9503 weight=1 max_fails=1 fail_timeout=1; #server 192.168.71.110:9503 weight=1 max_fails=1 fail_timeout=2; #server 192.168.71.130:9503 weight=1 max_fails=1 fail_timeout=2; } server { listen 9527; server_name testim.swoole.com; location / { proxy_pass htt://proxy_comet; #proxy_redirect off; proxy_set_header Connection "keep-alive"; proxy_send_timeout 1800; proxy_read_timeout 1800; proxy_connect_timeout 1800; keepalive_timeout 1800; } } /var/log/nginx/error.log 2016/04/07 08:44:13 [error] 17212#0: *25 upstream prematurely closed connection while reading response header from upstream, client: 192.168.137.1, server: testkf.xxx.com, request: "POST /sub HTTP/1.1", upstream: "http://127.0.0.1:9503/sub", host: "testkf.xxx.com:9527", referrer: "http://testkf.xxx.com/dialog.html" 弄了很久,还是找不到问题所在,/sub 长轮循在反向代理中存在问题,求指教。
发布于9年前 · 4 次浏览 · 来自
提问
大
大漠孤烟
韩哥,你好,在comet http长链接场景下, nginx启用反向代理情况下, htt://testkf.xxx.com:9527/sub firefox浏览器报502 Bad Gateway 会是什么原因 下面两个正常,能正常返回json格式结果,运行的代码是案例:/matyhtf/php-webim htt://testkf.xxx.com:9527/connect htt://testkf.xxx.com:9527/pub upstream proxy_comet { server 127.0.0.1:9503 weight=1 max_fails=1 fail_timeout=1; #server 192.168.71.110:9503 weight=1 max_fails=1 fail_timeout=2; #server 192.168.71.130:9503 weight=1 max_fails=1 fail_timeout=2; } server { listen 9527; server_name testim.swoole.com; location / { proxy_pass htt://proxy_comet; #proxy_redirect off; proxy_set_header Connection "keep-alive"; proxy_send_timeout 1800; proxy_read_timeout 1800; proxy_connect_timeout 1800; keepalive_timeout 1800; } } /var/log/nginx/error.log 2016/04/07 08:44:13 [error] 17212#0: *25 upstream prematurely closed connection while reading response header from upstream, client: 192.168.137.1, server: testkf.xxx.com, request: "POST /sub HTTP/1.1", upstream: "http://127.0.0.1:9503/sub", host: "testkf.xxx.com:9527", referrer: "http://testkf.xxx.com/dialog.html" 弄了很久,还是找不到问题所在,/sub 长轮循在反向代理中存在问题,求指教。
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2017-11-16
迷
迷离
同求
赞
0
回复
2020-05-18
季书歌
一样的问题,没法解决,只能停止swoole拓展。
赞
0
回复