# MongoDB Node Too Many Connections?

**URL:** <https://discourse.nodered.org/t/mongodb-node-too-many-connections/45875>\
**Category:** General\
**Created:** [18 May 2021 19:35 UTC](https://discourse.nodered.org/t/mongodb-node-too-many-connections/45875 "2021-05-18T19:35:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrSidX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrsidx/32/18935_2.png) [@mrSidX](https://discourse.nodered.org/u/mrSidX)\
**Post date:** [18 May 2021 19:35 UTC](https://discourse.nodered.org/t/mongodb-node-too-many-connections/45875/1 "2021-05-18T19:35:45Z")

</div>

I've implemented a `node-red-node-mongodb` node set into my flow, essentially managing a user base and related data,

I've had a few times where the MongoDB server goes off line with connection issues.

I look at the `mongodb.log` file and see entries like this:

`connection accepted from 127.0.0.1:58660 #1137 (1118 connections now open)`  
` [listener] pthread_create failed: Resource temporarily unavailable`

I suspect this is creating an instance each time I connect and not closing them... fast enough?

How can I ensure this will be stable and efficient in the future? I'm on a small AWS instance, for now... Not sure if this has anything to do with the accumulation of instances on the mongodb end of things?

The end goal is to have a growing set of users, and related content for the site, all via node-red, with a scaleable mongo set... The payloads are minimal, containing some user ID info, and some privileges... Same with the other DB's being utilized.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 July 2021 19:36 UTC](https://discourse.nodered.org/t/mongodb-node-too-many-connections/45875/2 "2021-07-17T19:36:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
