Reputation: 101
I'm getting a memory leak from Meteor.http.get when I try to make 5 parallel http requests / second: 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);
}
})
});
It seems to behave the same even if I reduce the rate down to 1 request / second.
Meteor.setInterval(function(){
module.feeder.getMatchesForCarry();
}, 2000);
Meteor.setInterval(function(){
Meteor.call("TEMP_d2_match_analyzerInsertSampleData", 9, function(err,response){});
}, 10000);
Is the source of this problem Node or Meteor?
If i perform 5 requests/sec , in about 5 minutes of running i get 80-100 mega filled
Upvotes: 9
Views: 605
Reputation: 3073
There is no issue with the code that you shared. Your memory leak, if that's indeed what you're observing, is in other places.
Upvotes: 0