By default, node.js has a 60 second timeout for TCP / IP connections. You can get around this by explicitly setting a timeout . Here is a quick example:
http.createServer(function (req, res) {
You can say that node can hold the connection indefinitely by setting the timeout value to 0. Also note that the 60 second timeout is applied by default to all socket connections in addition to TCP / IP.
source share