2

Im working on an application with node and mongodb for the first time. I user mongodb compass to access the database. The issue im having is, it gets disconnected when it is not active for about 30 minutes or more. How can I solve this issue? Is there any configuration that I should use to avoid this? I'm using mongodb for the first time.

Server selection timed out after 10000 ms

This is the error I get when it is disconnected.

Shashika Virajh
  • 8,497
  • 17
  • 59
  • 103
  • Are you connecting to MongoDB instance through SSH config? If yes then you need some extra configuration to make ssh connection to keep alive https://stackoverflow.com/a/25087194/3236733 – Shankar Regmi Jan 02 '20 at 14:40

0 Answers0