Skip to content
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

Livereload bug #1054

Closed
wyaeld opened this issue Jun 17, 2014 · 12 comments
Closed

Livereload bug #1054

wyaeld opened this issue Jun 17, 2014 · 12 comments

Comments

@wyaeld
Copy link

wyaeld commented Jun 17, 2014

First run, clean app

12:36 $ ember server
version: 0.0.34-master-5cfcb86a7a
Livereload server on port 35729
Serving on http://0.0.0.0:4200

Build successful - 593ms.

Slowest Trees                  | Total          
-------------------------------+----------------
TreeMerger (appAndDependencies) | 60ms           
TreeMerger (vendor)            | 48ms           
StaticCompiler                 | 41ms           
TreeMerger (app)               | 40ms           
StaticCompiler                 | 34ms           
TreeMerger (allTrees)          | 33ms           
ES3SafeFilter                  | 31ms 

ctrl+c

Second run, same app

12:38 $ ember server
version: 0.0.34-master-5cfcb86a7a
Livereload server on port 35729
Serving on http://0.0.0.0:4200
watch ENOSPC
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 Watcher.watchdir (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:184:20)
    at new Watcher (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:63:10)
    at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/index.js:65:17)
    at /home/brad/rails_projects/ember-cli/node_modules/broccoli/lib/builder.js:66:35
    at tryCatch (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:163:16)
    at invokeCallback (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:172:17)
    at /home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:186:17
    at flush (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:51:9)
    at process._tickCallback (node.js:415:13)

fs.js:1051
    throw errnoException(process._errno, 'watch');
          ^
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 Watcher.watchdir (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:184:20)
    at Walker.EventEmitter.emit (events.js:98:17)
    at /home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/walker/lib/walker.js:69:16
    at Object.oncomplete (fs.js:107:15)

This is ubuntu 14.04

12:52 $ npm -v
1.3.8

12:56 $ node -v
v0.10.17

Does anyone know the cause?

@stefanpenner
Copy link
Contributor

I suspect you may be out of hard drive space

@wyaeld
Copy link
Author

wyaeld commented Jun 18, 2014

Nope, 50g free. I'll see if I can test later on the version prior to the
new watcher

On Tue, Jun 17, 2014 at 1:17 PM, Stefan Penner [email protected]
wrote:

I suspect you may be out of hard drive space


Reply to this email directly or view it on GitHub
#1054 (comment)
.

@stefanpenner
Copy link
Contributor

Enospc is a posix error for error no space. I'm not sure how to interpret this in any other way

@wyaeld
Copy link
Author

wyaeld commented Jun 18, 2014

17:10 $ ember server
version: 0.0.34-master-5cfcb86a7a
Directory app
Livereload server on port 35729
Serving on http://0.0.0.0:4200
Directory vendor/loader
Directory vendor/jquery/dist
Directory vendor/handlebars
Directory vendor/ember
Directory vendor/ember-cli-shims
Directory vendor/ember-resolver/dist/modules
Directory vendor/ember-load-initializers
Directory vendor/ember-data
Directory vendor/ic-ajax/dist/named-amd
Directory tests
watch ENOSPC
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 Watcher.watchdir (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:185:20)
    at new Watcher (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:63:10)
    at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/index.js:65:17)
    at /home/brad/rails_projects/ember-cli/node_modules/broccoli/lib/builder.js:66:35
    at tryCatch (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:163:16)
    at invokeCallback (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:172:17)
    at /home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/promise.js:186:17
    at flush (/home/brad/rails_projects/ember-cli/node_modules/rsvp/dist/commonjs/rsvp/asap.js:51:9)
    at process._tickCallback (node.js:415:13)
Directory app
Directory vendor/jquery/dist
Directory vendor/loader
Directory vendor/handlebars
Directory vendor/ember
Directory vendor/ember-cli-shims
Directory vendor/ember-resolver/dist/modules
Directory vendor/ember-load-initializers
Directory vendor/ember-data
Directory vendor/ic-ajax/dist/named-amd
Directory app/components

fs.js:1051
    throw errnoException(process._errno, 'watch');
          ^
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 Watcher.watchdir (/home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js:185:20)
    at Walker.EventEmitter.emit (events.js:98:17)
    at /home/brad/rails_projects/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/walker/lib/walker.js:69:16
    at Object.oncomplete (fs.js:107:15)
~/rails_projects/vizember [master|✔] 
17:11 $ ls
app  bower.json  Brocfile.js  config  dist  node_modules  package.json  public  README.md  testem.json  tests  tmp  vendor
~/rails_projects/vizember [master|✔] 
17:11 $ cd tests
~/rails_projects/vizember/tests [master|✔] 
17:11 $ pwd
/home/brad/rails_projects/vizember/tests
~/rails_projects/vizember/tests [master|✔] 
17:11 $ df /home
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda5      384363572 216522964 148292960  60% /home
~/rails_projects/vizember/tests [master|✔] 
17:11 $ 

So I added a console.log to sane/index.js on l183 so I could see what dirs it blows up on.

I don't see what would be happening to cause the error though. There isn't anything unusual, and 40% of the volume is free.

@matebn
Copy link

matebn commented Jun 18, 2014

I had the same problem.
Deleting the /tmp directory and rerunning "ember server" resolved it.

@wyaeld
Copy link
Author

wyaeld commented Jun 22, 2014

Ok, have actually found the solution. Its not actually space. Its a lack of file watches

http://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc

The solution is this:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I suggest that adding a line to the README about this might be worthwhile.

There are some optimizations done in nodemon described here that might also be useful
remy/nodemon#214 (comment)

@stefanpenner
Copy link
Contributor

that makes sense

@chrmod
Copy link
Member

chrmod commented Jul 1, 2014

@wyaeld thanks for solution, having this document somewhere would be great.
BTW, isn't it Sane problem ?

@stefanpenner
Copy link
Contributor

@chrmod its actually just mis-alignment with sane and broccoli, i suspect both may need to be adjusted?

@stefanpenner
Copy link
Contributor

closing because the workaround is good for now. Both san/broccoli are aware for future work to improve this situation.

@betasve
Copy link

betasve commented May 4, 2015

Deleting the /tmp and changing the max watchfile number worked for me too. (thumbs up)

@milosb793
Copy link

Changing watchfile worked for me too! Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants