> For the complete documentation index, see [llms.txt](https://amnrsln.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amnrsln.gitbook.io/notes/back-end/mongodb.md). Agents can also search and read this documentation through its [MCP server](https://amnrsln.gitbook.io/notes/~gitbook/mcp).

# MongoDB

### **If you have issue with reconnecting to your mongodb database after a disconnect:**

* <https://scalegrid.io/blog/understanding-mongodb-client-timeout-options/>

These options are included in the options when connecting to MongoClient.

```javascript
reconnectTries: 2592000,
reconnectInterval: 1000,
socketTimeoutMS: 3600000, // 1 hour,
connectTimeoutMS: 3600000
```
