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.