# Node Developers: How To use setMaxListeners() using RED.events

**URL:** <https://discourse.nodered.org/t/node-developers-how-to-use-setmaxlisteners-using-red-events/50154>\
**Category:** Developing Nodes\
**Created:** [25 August 2021 10:14 UTC](https://discourse.nodered.org/t/node-developers-how-to-use-setmaxlisteners-using-red-events/50154 "2021-08-25T10:14:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 August 2021 10:31 UTC](https://discourse.nodered.org/t/node-developers-how-to-use-setmaxlisteners-using-red-events/50154/2 "2021-08-25T10:31:35Z")

</div>

> [@ollix](#):
>
> That's it.
> 
> **As usual, be warned to do that again. By switching the maximum numbers of listeners to 0 (or a very high number), you might run into trouble.**
> 
> I hope that brings some light into that matter for some of you.

You should _not_ be modifying the internal configuration of `RED.events`. By changing that max, you will then prevent any real listener leaks from being reported.

If you are using that for the internal operation of your nodes, you should create your own EventEmitter object and share that between your nodes. You are then free to modify the limit as you see fit.

[https://nodejs.org/api/events.html#events\_events](https://nodejs.org/api/events.html#events_events)

---

_[View the full topic](https://discourse.nodered.org/t/node-developers-how-to-use-setmaxlisteners-using-red-events/50154)._
