Node.js 中的最长 HTTP 请求执行时间为 120 秒,如何增加 http get/post 请求的最长执行时间?
注意:我使用的是 expressjs 框架
最佳答案
http://nodejs.org/api/http.html#http_server_timeout
server.timeout
Number Default = 120000 (2 minutes) The number of milliseconds of inactivity before a socket is presumed to have timed out.
Note that the socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections.
Set to 0 to disable any kind of automatic timeout behavior on incoming connections.
关于javascript - node.js 中长进程的最大执行时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27004316/