# LightHandler warning

**URL:** <https://discourse.nodered.org/t/lighthandler-warning/88533>\
**Category:** General\
**Created:** [6 June 2024 08:57 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533 "2024-06-06T08:57:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [6 June 2024 08:57 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/1 "2024-06-06T08:57:22Z")

</div>

Each time I restart NR, I have these warnings:

```auto
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 new listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 new listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 new listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(node:432) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [LightHandler]. Use emitter.setMaxListeners() to increase limit
(

```

What is "LightHandler" and how to troubleshoot this?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [6 June 2024 09:10 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/2 "2024-06-06T09:10:04Z")

</div>

`MaxListenersExceededWarning` is a common warning message.

One of your node types attaches to the `LightHandler` event variable - which means you potentially have 11 nodes from the same palette.

This is not a problem in itself, you can contact the author of the palette so that he can increase or remove this limit.

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [6 June 2024 09:11 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/3 "2024-06-06T09:11:24Z")

</div>

> [@GogoVega](#):
>
> One of your node types attaches to the `LightHandler` event variable - which means you potentially have 11 nodes from the same palette.

...and how to get the right palette? Should I look only for palettes with more than 11 nodes? I have a lot of palettes with more than 11 nodes...

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [6 June 2024 09:13 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/4 "2024-06-06T09:13:44Z")

</div>

This is the first step indeed, try to disable at least one and you will see if the number decreases. (I cannot remember if the message disappears below 10)

Share with us the palettes you use, I will see if I can find.

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [6 June 2024 09:18 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/5 "2024-06-06T09:18:41Z")

</div>

This is package.json:

```auto
{
  "name": "node-red-project",
  "description": "A Node-RED Project",
  "version": "0.0.1",
  "dependencies": {
    "alexa-remote2": "github:Apollon77/alexa-remote",
    "bcryptjs": "^2.4.3",
    "moment-timezone": "^0.5.33",
    "monaco-editor": "^0.34.0",
    "node-red-contrib-alexa-cakebaked": "~4.0.3",
    "node-red-contrib-countdown": "~1.3.2",
    "node-red-contrib-cron-plus": "~2.1.0",
    "node-red-contrib-email-out": "~0.1.1",
    "node-red-contrib-looptimer-advanced": "~0.0.8",
    "node-red-contrib-node-hue": "~0.9.5",
    "node-red-contrib-simple-gate": "~0.5.2",
    "node-red-contrib-simpletime": "~2.11.0",
    "node-red-contrib-tado-client": "~0.10.11",
    "node-red-contrib-ui-artless-gauge": "~0.3.12",
    "node-red-contrib-ui-led": "~0.4.11",
    "node-red-contrib-ui-level": "~0.1.46",
    "node-red-contrib-virtual-smart-home": "~4.4.0",
    "node-red-dashboard": "~3.6.5",
    "node-red-node-ping": "~0.3.3",
    "node-red-node-smooth": "~0.1.2"
  }
}

```

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [6 June 2024 09:20 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/6 "2024-06-06T09:20:23Z")

</div>

It's `node-red-contrib-node-hue`

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [6 June 2024 09:23 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/7 "2024-06-06T09:23:46Z")

</div>

The issue could depend upon the number of nodes connected to the palette, or the number of Hue groups/lamps?

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [6 June 2024 09:27 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/8 "2024-06-06T09:27:33Z")

</div>

I would say the number of in/out nodes

---

<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:** [20 June 2024 09:27 UTC](https://discourse.nodered.org/t/lighthandler-warning/88533/9 "2024-06-20T09:27:44Z")

</div>

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