# Dashboard crashing - EMFILE error

**URL:** https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323
**Category:** Dashboard
**Created:** [27 February 2020 11:51 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323 "2020-02-27T11:51:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![kaless](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaless](https://discourse.nodered.org/u/kaless)
#### Post date: [27 February 2020 11:51 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/1 "2020-02-27T11:51:25Z")

</div>

Hello,

When I activate a loop (30 process of about 500 ms), that simulate a CAN network, I get the following error and my dashboard become inactive (connection lost):

```auto
27 Feb 12:38:06 - [info] [exec:40bcec03.751834] error:Error: spawn /bin/sh EMFILE
27 Feb 12:38:06 - [info] [exec:40bcec03.751834] error:Error: spawn /bin/sh EMFILE
27 Feb 12:38:15 - [info] [exec:40bcec03.751834] error:Error: spawn /bin/sh EMFILE

```

For information, I am subscribing to an MQTT broker.  
Previously, I didn't have this behaviour but as I added more flows, the EMFILE error occured.

Research lead me to it being a node.js related issue about having "too many open file".  
However when I ran:

```auto
lsof -i -n -P | grep node

```

I only find 4 to 5 process, well bellow the limit 1024

```auto
ulimit -a | grep files
open files (-n) 1024

```

What in my usage of node-red may lead to its issue?  
How could I fix the issue?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 February 2020 12:19 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/2 "2020-02-27T12:19:53Z")

</div>

What is the command in the exec node?

---

<div class="post-metadata">

### Author: ![kaless](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaless](https://discourse.nodered.org/u/kaless)
#### Post date: [27 February 2020 12:44 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/3 "2020-02-27T12:44:50Z")

</div>

I don't know what exec node is a tthe origin of the error.  
I got the id that is alocated to the node in the log. Yet I don't know how to find which node it refer to.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 February 2020 13:09 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/4 "2020-02-27T13:09:24Z")

</div>

Have you got a lot of them in subflows?  
If you put a debug node in parallel with each one logging something to the console then you may be able to work out out from looking in the log.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [27 February 2020 13:56 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/5 "2020-02-27T13:56:29Z")

</div>

in the editor you should be able to use ctrl or cmd - f to search - in your case for the node id - 40bcec03.751834

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 February 2020 14:10 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/6 "2020-02-27T14:10:12Z")

</div>

I think I have got my threads crossed, I thought that had already failed due to it being in a subflow. I think that was a different thread though.

---

<div class="post-metadata">

### Author: ![kaless](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaless](https://discourse.nodered.org/u/kaless)
#### Post date: [27 February 2020 15:37 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/7 "2020-02-27T15:37:51Z")

</div>

I could find the node causing the error. However the node in question work previously, it is the fact that I add more flow/node (all unrelated), which causes an error.

The error seems to be coming from my environment limitation. (an ubuntu VM in virtualBox)  
I try the same project on a linux desktop (ubuntu too), and did not encounter any issue.

Somehow this issue is related to computer power. 😭

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 February 2020 20:34 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/8 "2020-02-27T20:34:25Z")

</div>

What does the exec node do?

---

<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: [28 March 2020 20:39 UTC](https://discourse.nodered.org/t/dashboard-crashing-emfile-error/22323/9 "2020-03-28T20:39:14Z")

</div>

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