node.js - How make http.globalAgent.maxSockets works on expressjs? -
i see number of posts on platform giving same solution not work me, here simple node program understand why still appears process requests 6 6 instead of setup in http.globalagent.maxsockets
?
var http = require('http'); http.globalagent.maxsockets = 10; var express = require('express'); var app = express(); app.use('/', function(req, res, next){ console.log('request /'); settimeout(function(){ res.send('ok'); console.log('handled'); }, 2000); }); app.listen(3309); console.log('server up.');
thank much...
it's not clear problem try solve, http.globalagent
singleton http client, can't affect code in way.
Comments
Post a Comment