Nginx upstream prematurely closed connection while reading response header from upstream, for large requests

前端 未结 9 1031
無奈伤痛
無奈伤痛 2020-12-24 04:27

I am using nginx and node server to serve update requests. I get a gateway timeout when I request an update on large data. I saw this error from the nginx error logs :

<
9条回答
  •  天命终不由人
    2020-12-24 05:04

    You can increase the timeout in node like so.

    app.post('/slow/request', function(req, res){ req.connection.setTimeout(100000); //100 seconds ... }

提交回复
热议问题