Livereload bug
wyaeld opened this issue · 12 comments
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?
I suspect you may be out of hard drive space
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 notifications@github.com
wrote:
I suspect you may be out of hard drive space
—
Reply to this email directly or view it on GitHub
#1054 (comment)
.
Enospc is a posix error for error no space. I'm not sure how to interpret this in any other way
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.
I had the same problem.
Deleting the /tmp directory and rerunning "ember server" resolved it.
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)
that makes sense
@wyaeld thanks for solution, having this document somewhere would be great.
BTW, isn't it Sane problem ?
@chrmod its actually just mis-alignment with sane and broccoli, i suspect both may need to be adjusted?
closing because the workaround is good for now. Both san/broccoli are aware for future work to improve this situation.
Deleting the /tmp and changing the max watchfile number worked for me too. (thumbs up)
Changing watchfile worked for me too! Thanks!!