Node: EMFILE: too many open files, watch Nodejs 11.8

Created on 31 Jan 2019  ·  13Comments  ·  Source: nodejs/node

  • 11.8.0:
  • Darwin qbook 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
  • ??

nodemon works great on 10.15. When I switch to see if my application
works on @latest, nodemon crashes. (My application works just fine when run
with Nodejs alone.)

The specifics...

Three of these:

node[17033] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)

Then this:

[nodemon] Internal watch failed: EMFILE: too many open files, watch

Other of my development contexts show the same result. Nodejs 10.15 supports nodemon.
Nodejs 11.8 crashes it.

In all cases, nodemon is monitoring fewer than 6000 files. I have tried limiting the
watched folders to see if I could find a lower limit but get a crash no matter what.
If I tell nodemon to ignore the entire code directory, it works.

fs macos

Most helpful comment

I've bundled the reported issues in #29460. That's the issue to track now.

All 13 comments

Thanks for the report. Can you check the following things? Order is important:

  1. Do you still get the error with v11.8.0?
  2. Do you also get the error with v11.7.0?
  3. Can you reboot and try v11.8.0 again?

There have been some changes that may or may not be responsible for this but it's also possible that you're hitting a macos bug so it'd be good to test it properly. Thanks!

Thanks for following up.

Careful retries found that...

11.7 and before works.

11.8 & 9 fail.

Rebooting did not change anything.

Also, I didn’t mention before that Nodemon is watching files on an NFS volume.
tqii

TQ White II
Website • blog.genericwhite.com
Phone • 708-763-0100

On Feb 2, 2019, at 3:21 AM, Ben Noordhuis notifications@github.com wrote:

Thanks for the report. Can you check the following things? Order is important:

Do you still get the error with v11.8.0?
Do you also get the error with v11.7.0?
Can you reboot and try v11.8.0 again?
There have been some changes that may or may not be responsible for this but it's also possible that you're hitting a macos bug so it'd be good to test it properly. Thanks!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node/issues/25856#issuecomment-459949994, or mute the thread https://github.com/notifications/unsubscribe-auth/AABvMDgD1QhsECMbHIElJsDYomWalg5sks5vJVitgaJpZM4adBnQ.

My hunch is that https://github.com/libuv/libuv/pull/2082 is responsible as that was the change that was introduced in v11.8.0. cc @vtjnash just in case.

Seems certainly plausible, as something new that changed. I tried googling the error message, but mostly I ended up going in circles, with people as far back as 2013 (10.8) getting that error, and then pointing to (the predecessors of) my PR as the probable fix for it 😜. Or also that https://github.com/joyent/libuv/commit/cd2794c01fc84a4118f79e31071cb1bca78918f5 should have solved it.

Also from googling, it seems like people have been periodically reporting this issue (or something very similar) over the years...to stack overflow, or their private blog. So this might not be something entirely new, but just the first user in years to successfully report the issue to the right forum. 🤣

Now I feel all warm inside.

Let me tell you that I think I have seen this error sometimes in the past. It must have gone away or I’d remember it more clearly but it might be a clue.
tqii
TQ White II
Website • blog.genericwhite.com
Phone • 708-763-0100

On Feb 4, 2019, at 6:04 PM, Jameson Nash notifications@github.com wrote:

Seems certainly plausible, as something new that changed. I tried googling the error message, but mostly I ended up going in circles, with people as far back as 2013 (10.8) getting that error, and then pointing to (the predecessors of) my PR as the probable fix for it 😜. Or also that joyent/libuv@cd2794c https://github.com/joyent/libuv/commit/cd2794c01fc84a4118f79e31071cb1bca78918f5 should have solved it.

Also from googling, it seems like people have been periodically reporting this issue (or something very similar) over the years...to stack overflow, or their private blog. So this might not be something entirely new, but just the first user in years to successfully report the issue to the right forum. 🤣


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node/issues/25856#issuecomment-460462765, or mute the thread https://github.com/notifications/unsubscribe-auth/AABvMDmf7LACR5NXJaJCNLyIWA1reb2iks5vKMqrgaJpZM4adBnQ.

My team ran into this issue in nodemon today when upgrading our project from Node.js 10 to 12.

We worked around it by updating our nodemon.json to ignore large directories that don't need to be watched.

Yesterday afternoon, I started getting this message on a project that I was working on in the morning without incident. Nothing changed except the time.

I was able to eliminate it by reducing the scope of the watched list but that meant I was not getting proper coverage.

I reinstalled and otherwise tried things. Eventually I got it to go away by upgrade from node 10 LTS to node 11.1.0.

This is just stupid.

@tqwhite I understand your frustration but please try to keep your comments constructive.

It’s not useful to know that changing from LTS to 11 fixes it? Seems like valuable info to me.
tqii
TQ White II
Website • blog.genericwhite.com
Phone • 708-763-0100

On Sep 4, 2019, at 12:42 PM, Zeke Sikelianos notifications@github.com wrote:

@tqwhite https://github.com/tqwhite I understand your frustration but please try to keep your comments constructive.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node/issues/25856?email_source=notifications&email_token=AAAG6MGINT2HQBVLSZP2FTDQH7XRLA5CNFSM4GTUDHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD54MAUQ#issuecomment-528007250, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAG6MCGWC5MWRGR3TGDA3TQH7XRLANCNFSM4GTUDHIA.

This is just stupid.

☝️ I was referring to this part of your comment. Language like this will do nothing to motivate contributors to prioritize this issue. If anything, it will disincentivize people to look into solving it. Please familiarize yourself with the Node.js Code of Conduct to have a better sense of what kinds of behavior are (not) tolerated in this project.

It’s been year. Nobody is prioritizing it and that’s a problem. However, the node code of conduct opposes calling people stupid and I agree with that insulting people is bad. I believe in decorum and kindness. However, a file-watching app that breaks between morning and night needs an adjective. You don’t like mine. I’m happy to hear what you think.
tqii
TQ White II
Website • blog.genericwhite.com
Phone • 708-763-0100

On Sep 4, 2019, at 4:30 PM, Zeke Sikelianos notifications@github.com wrote:

This is just stupid.

☝️ I was referring to this part of your comment. Language like this will do nothing to motivate contributors to prioritize this issue. If anything, it will disincentivize people to look into solving it. Please familiarize yourself with the Node.js Code of Conduct https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md to have a better sense of what kinds of behavior are (not) tolerated in this project.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node/issues/25856?email_source=notifications&email_token=AAAG6MCC7AT72TZFG2DCERDQIASF7A5CNFSM4GTUDHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD55BJQY#issuecomment-528094403, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAG6MHOAJINEYLBWJZRBRDQIASF7ANCNFSM4GTUDHIA.

FYI, nodemon has been working ok with node/11.1.0.

I tried it with node/11.10.1. It broke. Same problem.
tqii
TQ White II
Website • blog.genericwhite.com
Phone • 708-763-0100

On Sep 4, 2019, at 5:30 PM, TQ White II tq@justkidding.com wrote:

It’s been year. Nobody is prioritizing it and that’s a problem. However, the node code of conduct opposes calling people stupid and I agree with that insulting people is bad. I believe in decorum and kindness. However, a file-watching app that breaks between morning and night needs an adjective. You don’t like mine. I’m happy to hear what you think.
tqii
TQ White II
Website • blog.genericwhite.com http://blog.genericwhite.com/
Phone • 708-763-0100

On Sep 4, 2019, at 4:30 PM, Zeke Sikelianos <[email protected] notifications@github.com> wrote:

This is just stupid.

☝️ I was referring to this part of your comment. Language like this will do nothing to motivate contributors to prioritize this issue. If anything, it will disincentivize people to look into solving it. Please familiarize yourself with the Node.js Code of Conduct https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md to have a better sense of what kinds of behavior are (not) tolerated in this project.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node/issues/25856?email_source=notifications&email_token=AAAG6MCC7AT72TZFG2DCERDQIASF7A5CNFSM4GTUDHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD55BJQY#issuecomment-528094403, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAG6MHOAJINEYLBWJZRBRDQIASF7ANCNFSM4GTUDHIA.

I've bundled the reported issues in #29460. That's the issue to track now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfahlander picture dfahlander  ·  3Comments

sandeepks1 picture sandeepks1  ·  3Comments

srl295 picture srl295  ·  3Comments

akdor1154 picture akdor1154  ·  3Comments

vsemozhetbyt picture vsemozhetbyt  ·  3Comments