@damian-gądziak Maybe you can try to debug by adding this in that function console.log(tids.length, uid, new Error('test').stack);
Topics.filterWatchedTids = function (tids, uid, callback) {
console.log(tids.length, uid, new Error('test').stack);
async.waterfall([
function (next) {
db.sortedSetScores('uid:' + uid + ':followed_tids', tids, next);
},
function (scores, next) {
tids = tids.filter(function (tid, index) {
return tid && !!scores[index];
});
next(null, tids);
},
], callback);
};
I am guessing the function is called by a huge amount of tids, so the next step would be to find out why and from where.