http-proxy を使用してリクエストを特定のポートに転送しています
コードは次のとおりです。
var httpProxy = require('http-proxy');
options = {
hostnameOnly:true,
router: {
'appname.nodejs.mydomain.com':'127.0.0.1:8001',
'otherapp.nodejs.mydomain.com':'127.0.0.1:8002'
}
}
httpProxy.createServer(options).listen(80);
起動すると問題なく動作しますが、オンラインユーザーが300ユーザーを超えた後、警告が表示されました
we have 338 users online.
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at Socket.EventEmitter.addListener (events.js:175:15)
at Socket.EventEmitter.once (events.js:196:8)
at ClientRequest.HttpProxy.proxyRequest (/usr/local/lib/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js:316:12)
at ClientRequest.g (events.js:192:14)
at ClientRequest.EventEmitter.emit (events.js:126:20)
at ClientRequest.onSocket (http.js:1525:9)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
we have 339 users online.
この問題に関する提案を教えてください。