use*_*305 9 memory-leaks http node.js meteor
当我尝试制作5个并行的http请求/秒时,我从Meteor.http.get得到内存泄漏:gist
match_ids.forEach(function(match_id){
var url = self.generateUrl(match_id);
Meteor.http.get(url, function(err, response){
if(!err && !response.data.result.error){
callback(null, response.data.result);
}else{
callback(err || response.data.result.error, match_id);
}
})
});
Run Code Online (Sandbox Code Playgroud)
即使我将速率降低到1个请求/秒,它似乎表现相同.
Meteor.setInterval(function(){
module.feeder.getMatchesForCarry();
}, 2000);
Meteor.setInterval(function(){
Meteor.call("TEMP_d2_match_analyzerInsertSampleData", 9, function(err,response){});
}, 10000);
Run Code Online (Sandbox Code Playgroud)
是Node或Meteor这个问题的根源吗?
如果我执行5个请求/秒,在大约5分钟的运行中我得到80-100兆的填充
归档时间: |
|
查看次数: |
554 次 |
最近记录: |