These are chat archives for Automattic/mongoose

27th
Mar 2019
LouBerry
@LouBerry
Mar 27 15:41
Hi guys, I hit a huge wall on what I think is very basic. I want my node.js app connect to mongodb (which is working), keep the connection and close it at the very end, when all actions are done. But as soon as I add mongoose.connection.close() at any point of my code other than `bject.save().mongoose.connection.close() I always get a "MongoError: server instance pool was destroyed". I cant use .then() seems not work, I cant await it... nothing. I tried to reach out at stack overflow with no success so far "https://stackoverflow.com/questions/55378106/javascript-mongoose-hot-to-close-properly-after-save"