New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error "Error: watch ENOSPC" #214
Comments
Version of Node? |
Also, can you provide a simple test case script you're using (to test with). |
use Node 0.10.21. With any script, generates an error. |
Is this the same issue as #144? I can't replicate this on my mac (though I didn't ask what OS you had, but assumed *nix type based on the path in your paste above). |
Not the same, are different here is running a single processo. In the other runs on multiple processo, non-cloud |
Experienced this error today with multiple apps (express, restify). NodeJS: v0.10.21
reproduce:
app.js (from http://nodejs.org/)
|
I got same error with CoffeeScript --watch
|
I got the same error with a compound.js project using coffeescript on Ubuntu 13.10 with node 0.10.21 $ nodemon server.coffee
27 Nov 21:40:14 - [nodemon] v0.7.10
27 Nov 21:40:14 - [nodemon] to restart at any time, enter `rs`
27 Nov 21:40:14 - [nodemon] watching: /home/chok/work/edf/bluetic/src
27 Nov 21:40:14 - [nodemon] exception in nodemon killing node
Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Object.watchFileChecker.check (/usr/local/lib/node_modules/nodemon/nodemon.js:160:6)
at ready (/usr/local/lib/node_modules/nodemon/nodemon.js:49:22)
at /usr/local/lib/node_modules/nodemon/nodemon.js:63:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
|
Can someone have a go at this with the dev version of nodemon? I've made a lot of changes and am trying to concentrate my efforts on making sure the new version gets all these issues closed. You can install using |
Works for me now dunno why. Using latest stable nodemon npm version. Also had same issue with coffeescript --watch and this works too now. No node update, just npm install modules and distro updates. |
I have the same error but the process stop : $ nodemon server.coffee
3 Dec 15:32:42 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11) |
@chok can you run the following (and paste the result) for me in the same directory you're running nodemon:
I'm trying to get an idea what's actually causing this problem. |
Here is the result : $ find . | wc
7677 7677 542965 |
Okay, that's 7600 files it's trying to bind watches too. Can you run |
Pastie said it's too large (more than 64kb) and after all I don't like the text at the bottom :p (All your pastes are belong to us. ). I removed some parts specific to my projects. By the way, most of files are, of course, located in node_modules. You can find it on gist : https://gist.github.com/chok/7774318 |
Okay, I think this is a problem entirely linked to the number of files being monitored (since you're having to bind to each individual file). I was thinking about ignoring node_modules and .git directories by default, but can you try doing it with the ignore command (assuming you're still running 0.9.x):
Of course this shouldn't need to be done every time, I'm just trying to confirm this is the issue. |
It doesn't work :( $ nodemon -i node_modules/ server.coffee
3 Dec 20:52:32 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11) I also try : $ nodemon -w app/* server.coffee
3 Dec 20:53:32 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11) |
Can you run the exact same command, but add |
There is no change : $ nodemon -i node_modules/ server.coffee --dump
3 Dec 21:17:18 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11) |
Hmm, sorry, can you stick |
I already tried both :( $ nodemon -i node_modules/ --dump server.coffee
3 Dec 21:25:35 - [nodemon] v0.9.10
[nodemon] exception in nodemon killing node
[nodemon] Error: watch ENOSPC
at errnoException (fs.js:1019:11)
at FSWatcher.start (fs.js:1051:11)
at Object.fs.watch (fs.js:1076:11)
at Function.check (/usr/local/lib/node_modules/nodemon/lib/config/watchable.js:34:6)
at alternativeCheck (/usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:18:15)
at /usr/local/lib/node_modules/nodemon/lib/config/checkWatchSupport.js:36:11
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11) |
Hi. I don't want to sound obtuse, but when I encountered this error I fixed it by increasing |
@taylorjbrennan yeah, I know that will fix the issue, but whilst @chok is able to replicate consistently, I'm after a change that will fix nodemon without the user needing to do the |
@remy great, I look forward to seeing it. |
@chok can you try this again with nodemon@1.0.0 - nodemon now ignores .git and node_modules/**/node_modules by default, so the number of watches should be significantly lower (I'll reopen if this is still an issue). I'm also going to try to detect the |
I haven't this message anymore :) but now I have the problem explained in #245 |
@alejonext can you try with The error actually means "Error NO disk SPaCe" - but I think it's linked to the number of files being monitored, which should be reduced down via changes to the watching code... |
@remy Works perfect :) thanks for your work!!!! |
Sweet. There'll be a stable release of 1.3.0 to npm likely this week with a bunch of bug fixes too. |
@remy astonished with response time. Thanks! |
@remy node v0.10.33 |
I've fixed this with this command ember-cli/ember-cli#1240 (comment) but is updating the package the recommended way? I'm wondering why it got like this in the first place. I'm using node version manager with |
The post suggest running this to increase the number of watches that are available.
|
I'm having this issue with |
Please try with #625 On Tue, 8 Sep 2015 16:20 Wesley Queiroz notifications@github.com wrote:
|
Tried with |
How many files are you trying to watch? i.e. how many are under your On Tue, 8 Sep 2015 at 17:37 Wesley Queiroz notifications@github.com wrote:
|
Not many, 30 at max.
the server folder has: |
Yeah...so run |
Running |
Okay, so I think that the watch is including the |
@wesleycoder can you try with the latest |
Whoa! |
This might be because of your system reach out of user can watch files. you can use the following command line in ubuntu Ref to this stackoverflow |
it works ! |
works for me too ! |
Same here ! 👍 |
Run this command
|
Another possible solution is to add a
|
The fs notify trick doesn't seem to work on a docker container... at least not Alpine 3.8, I get the same ENOSPC error. It's becoming more important as tools get deprecated and we still need to maintain legacy products |
The text was updated successfully, but these errors were encountered: