A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Is it necessary to close the mongoose connection?

Best Answers

When you are developing application and making a connection to mongodb database, you use single instance of connection for all database operation in an entire application, so it doesn't matter whether you close a connection or not. read more

But for an instance you are running a test cases for a same application each time you open a new connection and perform a operation for each test cases, in this scenario if you don't close a connection at the end of each test cases, the connections will get piled up and you will run short of memory. read more

Encyclopedia Research

Wikipedia:

Related Question Categories

Image Answers

Further Research