Code Monkey home page Code Monkey logo

Comments (39)

shama avatar shama commented on August 21, 2024 26

http://lmgtfy.com/?q=how+to+set+the+ulimit+on+osx+10.9

from grunt-contrib-copy.

shama avatar shama commented on August 21, 2024 6

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.

leek avatar leek commented on August 21, 2024 4

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.

brennanMKE avatar brennanMKE commented on August 21, 2024 3

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.

ctalkington avatar ctalkington commented on August 21, 2024

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.

sindresorhus avatar sindresorhus commented on August 21, 2024

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.

bretmorris avatar bretmorris commented on August 21, 2024

+1 @sindresorhus

from grunt-contrib-copy.

ilanbiala avatar ilanbiala commented on August 21, 2024

How can this be changed in mavericks?

from grunt-contrib-copy.

 avatar commented on August 21, 2024

I have a question on SO whcih may help solve this issue without changing the ulimit.

from grunt-contrib-copy.

MrAlexLau avatar MrAlexLau commented on August 21, 2024

@ilanbiala - I found this post to be more helpful than the things I found on SO.

from grunt-contrib-copy.

vbud avatar vbud commented on August 21, 2024

+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.

andersonaguiar avatar andersonaguiar commented on August 21, 2024

+1 @leek

from grunt-contrib-copy.

robwierzbowski avatar robwierzbowski commented on August 21, 2024

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.

ivancamilov avatar ivancamilov commented on August 21, 2024

@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.

dovy avatar dovy commented on August 21, 2024

@leek yours is the only solution that worked. Bless you.

from grunt-contrib-copy.

aaronbuchanan avatar aaronbuchanan commented on August 21, 2024

+1 @leek

from grunt-contrib-copy.

rjhilgefort avatar rjhilgefort commented on August 21, 2024

@ivancamilov solution should be preferred (and works for me)

from grunt-contrib-copy.

marcfalk avatar marcfalk commented on August 21, 2024

+1 @leek, thanks!

from grunt-contrib-copy.

zuccs avatar zuccs commented on August 21, 2024

I have 200+ posts and @leek's solution fixed it for me too.

from grunt-contrib-copy.

papayaah avatar papayaah commented on August 21, 2024

thanks @leek !

from grunt-contrib-copy.

gcko avatar gcko commented on August 21, 2024

I have a preference towards @ivancamilov 's answer as it compartmentalizes the change better.

from grunt-contrib-copy.

captDaylight avatar captDaylight commented on August 21, 2024

+1 @leek badaboom

from grunt-contrib-copy.

epicwhale avatar epicwhale commented on August 21, 2024

+1 @leek

from grunt-contrib-copy.

roNn23 avatar roNn23 commented on August 21, 2024

+1 @leek

from grunt-contrib-copy.

annaelleduff avatar annaelleduff commented on August 21, 2024

Did anyone experience any problem after executing @leek 's command?
My computer (yosemite) crashes right after I run it.

from grunt-contrib-copy.

flatsteve avatar flatsteve commented on August 21, 2024

@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.

ivancamilov avatar ivancamilov commented on August 21, 2024

@nnaelle and @flatsteve, perhaps you should set a lower limit, like 1024 or so.

from grunt-contrib-copy.

jhoniemartinez avatar jhoniemartinez commented on August 21, 2024

@flatsteve I'm having the same issue after updating to Yosemite (10.10.3)

from grunt-contrib-copy.

annaelleduff avatar annaelleduff commented on August 21, 2024

@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.

vizonluo avatar vizonluo commented on August 21, 2024

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.

flatsteve avatar flatsteve commented on August 21, 2024

@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.

alundiak avatar alundiak commented on August 21, 2024

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.

rizkysyazuli avatar rizkysyazuli commented on August 21, 2024

the .bash_profile solution works for me. thx @vizonluo!

from grunt-contrib-copy.

msikma avatar msikma commented on August 21, 2024

@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.

crgc avatar crgc commented on August 21, 2024

+1 @vizonluo

from grunt-contrib-copy.

ericmotil avatar ericmotil commented on August 21, 2024

👍 .bash_profile worked for me too. Thanks, @vizonluo.

from grunt-contrib-copy.

kmoe avatar kmoe commented on August 21, 2024

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.

leek avatar leek commented on August 21, 2024

Thanks @kmoe @msikma - I've edited my comment just in case others come across this thread.

from grunt-contrib-copy.

dansandland avatar dansandland commented on August 21, 2024

+1 @alundiak - Reinstalling the latest NodeJS resolved it for me. I'm on Yosemite.

from grunt-contrib-copy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.