Comments (39)
http://lmgtfy.com/?q=how+to+set+the+ulimit+on+osx+10.9
from grunt-contrib-copy.
Check your ulimit, I know on OSX the default is really low, 256. Run ulimit -n
to see the limit and then ulimit -n 10480
to set a higher limit.
from grunt-contrib-copy.
For anyone who gets here via search, just run this:
$ ulimit -n 4096
Edit: Since this comment was posted, the call to launchctl
is no longer necessary. I've edited the command above; but for reference, here was the original:
$ launchctl limit maxfiles 4096 8192 && ulimit -n 4096
from grunt-contrib-copy.
The solution of the max file limit is different for macOS Sierra. I wrote up instructions which can resolve the problem.
https://gist.github.com/brennanMKE/f6aa55b452ecda2f4c7a379e21647c88
from grunt-contrib-copy.
what version of grunt? are you using grunt-contrib-watch?
I know there are some issues with open file limits on some operating systems.
I've never personally tried that amount of files but have you tried the copy without watch. You may want to reconsider copying that many files everytime something changes.
cc @shama
from grunt-contrib-copy.
That will not save the limit:
http://superuser.com/questions/261023/how-to-change-default-ulimit-values-in-mac-os-x-10-6
from grunt-contrib-copy.
from grunt-contrib-copy.
How can this be changed in mavericks?
from grunt-contrib-copy.
I have a question on SO whcih may help solve this issue without changing the ulimit.
from grunt-contrib-copy.
@ilanbiala - I found this post to be more helpful than the things I found on SO.
from grunt-contrib-copy.
+1 @leek. Many blog posts and SO questions don't mention both. I needed to do both commands, launchctl
and then ulimit
.
What's odd is that, prior to setting an actual hard limit with launchctl
(it was "unlimited" when I ran launchctl limit maxfiles
), I wasn't able to successfully change the launchctl
soft limit or the ulimit
limits until that was done.
from grunt-contrib-copy.
+1 @leek
from grunt-contrib-copy.
Worked for me on Mavericks: http://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks/109488#109488
from grunt-contrib-copy.
@leek's solution works, but it creates a problem with Adobe Illustrator CS6 described at the end of this post.
I'd suggest setting ulimit
in your ~/.bash_profile
so it doesn't interfere with other programs.
from grunt-contrib-copy.
@leek yours is the only solution that worked. Bless you.
from grunt-contrib-copy.
+1 @leek
from grunt-contrib-copy.
@ivancamilov solution should be preferred (and works for me)
from grunt-contrib-copy.
+1 @leek, thanks!
from grunt-contrib-copy.
I have 200+ posts and @leek's solution fixed it for me too.
from grunt-contrib-copy.
thanks @leek !
from grunt-contrib-copy.
I have a preference towards @ivancamilov 's answer as it compartmentalizes the change better.
from grunt-contrib-copy.
+1 @leek badaboom
from grunt-contrib-copy.
+1 @leek
from grunt-contrib-copy.
+1 @leek
from grunt-contrib-copy.
Did anyone experience any problem after executing @leek 's command?
My computer (yosemite) crashes right after I run it.
from grunt-contrib-copy.
@nnaelle Same issue - Mac Yosemite (10.10.3) hangs after running this command. Did you manage to solve the issue? Cheers.
from grunt-contrib-copy.
@nnaelle and @flatsteve, perhaps you should set a lower limit, like 1024 or so.
from grunt-contrib-copy.
@flatsteve I'm having the same issue after updating to Yosemite (10.10.3)
from grunt-contrib-copy.
@flatsteve no... I kinda-sorta fixed my gruntfile, but my guess is that it gets stucked on an infinite loop, and as my job was not really related to that and that the gruntfile was made by another company, I chose not to touch it too much and just delete some of the lines that were crashing my computer. (basically I had 3 infinite loops, deleted two, my computer wasn't crashing anymore with just 1 infinite loop, it was just getting reaaaaally slow). Also, using grunt watch just once in a while vs. during all the time I was working on my project helped.
from grunt-contrib-copy.
I find a solution in Yosemite (10.10.3) and it works for me. see http://problemsolv.in/fix-mac-os-x-yosemite-ulimit-problem/
from grunt-contrib-copy.
@nnaelle Thanks! I also fixed the issue by modifying my grunt file...
Note to others, if you are seeing this issue it is possible you are watching too many files in your grunt/gulp watch task (make sure you are not being stupid like me and watching the contents of your jspm_packages ((or similar)) directory 😉).
from grunt-contrib-copy.
FYI.
.bash_profile
update didn’t help me for 10.10.3, but reinstallation NodeJS from 0.10.35 to 0.12.3 helped me, and error disappear.
from grunt-contrib-copy.
the .bash_profile
solution works for me. thx @vizonluo!
from grunt-contrib-copy.
@leek: please edit your answer, this causes an instant system hang on Yosemite for at least myself and several others in this thread.
from grunt-contrib-copy.
+1 @vizonluo
from grunt-contrib-copy.
👍 .bash_profile
worked for me too. Thanks, @vizonluo.
from grunt-contrib-copy.
Please be careful with @leek's solution. The limit is way too low for many systems and will cause them to hang until reboot. Do not add these lines to your bash_profile
or similar until you know the limit is high enough.
from grunt-contrib-copy.
Thanks @kmoe @msikma - I've edited my comment just in case others come across this thread.
from grunt-contrib-copy.
+1 @alundiak - Reinstalling the latest NodeJS resolved it for me. I'm on Yosemite.
from grunt-contrib-copy.
Related Issues (20)
- hide page HOT 1
- What is it do when copy?
- syncTimestamp running even if timestamp option is false HOT 2
- Document options HOT 1
- Using expand with --no-write fails
- timestampEqual test fails on i386 Linux
- file not copied [no src] HOT 1
- Question than issue
- Copy task not working in windows running forever HOT 5
- Audio files are breaking :'( HOT 1
- Process Function Corrupts Images and fons files
- How to resolve the below error ? HOT 2
- Replace not working with multiple files.
- .filename not copied with src: **/**
- node Assertion failed on copy HOT 3
- Decompose list and move the files in the list to an existing directory
- Xgboost and Bayesian Optimization HOT 1
- Slow on windows HOT 2
- Grunt-Copy-JS annoying Warning: EPERM: operation not permitted, futime Use --force to continue. HOT 2
- Copy files is broken after update Grunt v1.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-contrib-copy.