memory leak using mongoose in node.js

i’m new to nodejs and mongodb. Currently i’m facing memory-leak issue that i not sure whether it’s caused by moongose model but i will provide some screenshot below. Here is my product.js const mongoose = require(‘mongoose’); mongoose.connect(‘mongodb+srv://dbuser:[email protected]/test?retryWrites=false&w=majority’, { useNewUrlParser: true, dbName: “xxxxxx”, }); mongoose.connection.on(‘connected’, function(){ console.log(‘connected’) }); mongoose.connection.once(‘open’, function () { console.log(‘once open’) }); const…

Details

Error while “sudo apt-get update”

I was trying to run the command sudo apt-get update It showed me the following error. E: Failed to stat /var/lib/apt/lists/partial/packages.microsoft.com_repos_vscode_dists_stable_InRelease – pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory) E: Failed to stat /var/lib/apt/lists/partial/packages.microsoft.com_repos_vscode_dists_stable_main_binary-amd64_Packages – pkgAcqTransactionItem::TransactionState-stat (2: No such file or directory) W: Duplicate sources.list entry http://packages.microsoft.com/repos/vscode stable Release How to solve this error?

Details