solution: boilerplate-mongomongoose - Replit
Link to the challenge:
Hey yall. Hope you are doing well.My RAM usage for some reason is touching the limits making my solution link non responsive.
Could someone help me? Thanks in advance.
solution: boilerplate-mongomongoose - Replit
Link to the challenge:
Hey yall. Hope you are doing well.My RAM usage for some reason is touching the limits making my solution link non responsive.
Could someone help me? Thanks in advance.
Hello!
One problem I see is that you never call done when there’s an error, which may be causing multiple connections to be kept open:
var removeById = function(personId, done) {
Person.findByIdAndRemove(
personId,
(err, removedDoc) => {
if(err) return console.log(err); // Here you should call done(err) and, also, log the error
done(null, removedDoc);
}
);
};