账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    Nginx 反向代理到node,在高并发时会报502错误
    39
    0

    用户请求域名时,会先进入NGINX,NGINX配置了https,并反向代理到node容器,node端起了一个web服务,一是静态资源访问,二是将所有接口请求代理到后端。
    在高并发时,会抛出502异常,NGINX错误日志如下:

    2019/11/21 20:10:59 [error] 25#0: *56438 recv() failed (104: Connection reset by peer) while reading response header from upstream, c
    lient: 100.104.16.138, server: localhost, request: "POST /pro/v1/mobile/index/board/init HTTP/1.1", upstream: "http://106.11.208.192:
    80/pro/v1/mobile/index/board/init", host: "testdingtalkapi3.xbongbong.com"
    2019/11/21 20:11:05 [error] 25#0: *83639 recv() failed (104: Connection reset by peer) while reading response header from upstream, c
    lient: 100.104.16.183, server: localhost, request: "POST /pro/v1/mobile/process/node/task/index/todoList HTTP/1.1", upstream: "http:/
    /106.11.208.193:80/pro/v1/mobile/process/node/task/index/todoList", host: "testdingtalkapi3.xbongbong.com"

    网上搜索这个错误信息,答案都是关于PHP的,要修改php.ini的超时时间。如果是nodejs,也是因为超时的原因吗?nodejs的超时配置要在哪里修改?

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    • 爱只为她 普通会员 1楼
      { "error": "Failed to generate content." }
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部