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

EMFILE + ENOSPC errors swallowed by Grunt hook instead of being logged as errors #3523

Closed
mikermcneil opened this issue Jan 23, 2016 · 4 comments

Comments

@mikermcneil
Copy link
Member

For reference:

In Sails v0.11.3, with:

"grunt": "0.4.5",
    "grunt-contrib-clean": "0.6.0",
    "grunt-contrib-coffee": "0.13.0",
    "grunt-contrib-concat": "0.5.1",
    "grunt-contrib-copy": "0.5.0",
    "grunt-contrib-cssmin": "0.9.0",
    "grunt-contrib-jst": "0.6.0",
    "grunt-contrib-less": "1.1.0",
    "grunt-contrib-uglify": "0.7.0",
    "grunt-contrib-watch": "0.6.1",
    "grunt-sails-linker": "0.10.1",
    "grunt-sync": "0.2.4",
∑ npm -v
2.8.4
∑ node -v
v0.10.26

EMFILE errors from Grunt are being swallowed (logged as verbose), e.g.:

verbose: Grunt :: Warning: EMFILE: Too many opened files.
verbose: Grunt :: Running "watch" task

Haven't had a chance to test yet to see if this is occurring in 0.11.4 or the 0.12.0 prerelease, but leaving this as a note in the mean time.

@mikermcneil
Copy link
Member Author

As a side note, it seems that there are other issues with [email protected]. Changes to deeply nested files are not noticed-- switching to [email protected] seems to solve the problem. Will need to dig deeper into this grunt plugin to see if there are any related issues there (otherwise we'll have to revert to 0.5.x as the generatd dep version in new sails apps)

@mikermcneil mikermcneil added bug and removed bug labels Jan 25, 2016
@mikermcneil
Copy link
Member Author

Created separate issue for the issue with [email protected] not noticing events for nested files/directories (it's a separate problem)

@mikermcneil mikermcneil changed the title in 0.11.3, ULIMIT errors swallowed by Grunt hook with upgraded grunt deps, ULIMIT errors swallowed by Grunt hook instead of logging as errors Jan 25, 2016
@mikermcneil
Copy link
Member Author

Just verified that this actually happening on [email protected] as well (earlier when I thought it had been solved, apparently I was wrong).

Full details:

∑ npm -v
2.8.4
∑ node -v
v0.10.26
"grunt": "0.4.5",
    "grunt-contrib-clean": "0.6.0",
    "grunt-contrib-coffee": "0.13.0",
    "grunt-contrib-concat": "0.5.1",
    "grunt-contrib-copy": "0.5.0",
    "grunt-contrib-cssmin": "0.9.0",
    "grunt-contrib-jst": "0.6.0",
    "grunt-contrib-less": "1.1.0",
    "grunt-contrib-uglify": "0.7.0",
    "grunt-contrib-watch": "0.5.3",
    "grunt-sails-linker": "0.10.1",
    "grunt-sync": "0.2.4",
verbose: Grunt :: Warning: EMFILE, too many open files 'assets'
verbose: Grunt :: Running "watch" task

@mikermcneil mikermcneil changed the title with upgraded grunt deps, ULIMIT errors swallowed by Grunt hook instead of logging as errors ULIMIT errors swallowed by Grunt hook instead of being logged as errors Jan 28, 2016
@mikermcneil mikermcneil changed the title ULIMIT errors swallowed by Grunt hook instead of being logged as errors EMFILE errors swallowed by Grunt hook instead of being logged as errors Jan 28, 2016
@mikermcneil
Copy link
Member Author

mikermcneil commented Jan 28, 2016

Argh- meant to say EMFILE not "ULIMIT".

If you're reading this and haven't had to deal w/ EMFILE errors before, here's how you solve it on OS X for reference:

ulimit -n 1024

^^ that'll last as long as a terminal window is open. Also note that more recent versions of OS X don't allow you to specify a ulimit much higher than 1024.

Update

If you're on Linux, you might be seeing ENOSPC instead. In that case, check out:
https://stackoverflow.com/questions/16748737/grunt-watch-error-waiting-fatal-error-watch-enospc

(The solution is similar, you just need to run a different command.)

@mikermcneil mikermcneil added grunt repro please Could you reproduce this in a repository for us? and removed repro please Could you reproduce this in a repository for us? labels Jan 31, 2016
@mikermcneil mikermcneil changed the title EMFILE errors swallowed by Grunt hook instead of being logged as errors EMFILE + ENOSPC errors swallowed by Grunt hook instead of being logged as errors Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant