Getting past the 2000/11800 file limit
bourgeoisbanana:
@mynamenotbob you can use the default textedit program and then rename the file to .plist
Unfortunately this method doesn't seem to work for me. I've disabled SIP as instructed, created the two new .plist files in the launchdaemons folder, and run the "sudo chown root:wheel <PathToFile>" and "sudo chmod 0644 <PathToFile>" commands, yet every time I restart my mac the default is back to 12288 and 10240. What am I doing wrong here?
When I type in launchctl limit these changed aren't applies, so something isn't reading correctly.
I also have no idea how to edit my bashrc or similar shell files, could you provide more detailed instructions for this as you've done for everything else? I would really appreciate it!
lordtyger:
@mynamenotbob I used TextEdit, but you can use any app that produces plain Text files, just change the file extension to .plist
@bourgeoisbanana I can't really help that much with bashrc or similar shell files as I don't use them, I have studied Unix, but I have not had any reason to make and use a shell file, so I have not done so. Sorry that I can't be of much help with this aspect.
On the main issue, my advice to approach it step by step, first copy and then paste my text {minus the part with the instructions} into a text file {copy and paste greatly reduces transciption errors} that is someplace like your Desktop and thus not in the Special launchdaemons folder {the OS does not allow modification of files in that folder, SIP off or not}, then save and change the file extensions to .plist then if you have your previous attempts in the launchdaemons folder remove them and put the new files in the launchdaemons folder. Then Run Terminal and do the file ownership commands making sure of course to put your Admin password in of course.
Should work, I set up my .plist files and it worked the first time and then I needed to increase the numbers so I did it again and it worked again. So Do Each Step Carefully and Check that you are doing the Step Correctly and it should work.
midnightrrider:
Quote
You will be asked for your admin password the first time and when you type it you won’t see any typing. Just hit return when you are finished entering it.
=*=*=*=*=*=*=*=*=
In addition to setting these limits at the system level, it is recommended, (but not required) that you set the limits at the session level as well by appending the following lines to your bashrc, bashprofile, or analogous file:
Shell
ulimit -n 65536
ulimit -u 2048
Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions.
At this point, you can restart your computer and enter ulimit -n into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 65536.
I followed all the steps (I suppose) correctly, my terminal at this point says: Quote
sudo chown root:wheel/Library/LaunchDaemons/limit.maxfiles.plist
Password:
usage: chown [-fhnv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhnv] [-R [-H | -L | -P]] :group file ...
and: Quote
sudo chmod 0644/Library/LaunchDaemons/limit.maxproc.plist
usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [# [ n]]] mode|entry file ...
chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
It's everything okay or something is missing? Sorry If I'm asking you all this questions, just trying to figure it out. Also I wanted to know what do you mean by adding
Quote
Shell
ulimit -n 65536
ulimit -u 2048
to the basharc or bashprofile and where I have to place this and in which format (plist? or it is basharc a file format?). Do I have to place it in the same Launchdeamon folder i guess?
I restarted my mac and skipped the last step and the file limits are the same as before. And if I put ulimit -n in the terminal I see 256... what does it mean?
Update: I tried to see if the files are in the correct directory running sudo chmod 644 and with both it says "No such file or directory" like the mac doesn't read that at all. I tried to run launchctl limit and like @bourgeoisbanana said, nothing has changed. Could it be that with Catalina things are different? I did again all the steps correctly, I copied the xml into a text and added the .plist extension to all of them and placed them in the launchdeamon folder. I disabled SIP long time ago and I verified if it is still disabled, and it is, so I don't know what I'm doing wrong.
lordtyger:
Note: you should have Show all filename extensions checked to On. Otherwise you can get confused about the filename extensions and with what we are doing having the correct extension is critical. So make sure that you are set to Show all filename extensions.
I am fairly certain that you may need to keep the files that you create in someplace normally accessible Like the Desktop for example and then run the Terminal before you place the files in their proper place.
Then Make sure that you then place the files in the Correct Directory, I know it is confusing but the Mac has 3 Different Library Folders and it sounds like you might have put the files in the wrong place.
Quote
Update: I tried to see if the files are in the correct directory running sudo chmod 644 and with both it says "No such file or directory" like the mac doesn't read that at all. I tried to run launchctl limit and like @bourgeoisbanana said, nothing has changed.
At least according to what you wrote. I think that is the problem.
On my Mac the correct path is <Mac's Hard Drive Name>/Library/LaunchDaemons
On your Mac when you look inside the <Mac's Hard Drive Name>/Library/ do you see a Folder named "LaunchDaemons"?
Do let me know on this.
If so then Apple did not change the file structure {I don't expect that they would it would mean more than a few Popular Apps would have to be fixed if they did}. So you need to put the files in the <Mac's Hard Drive Name>/Library/LaunchDaemons folder and I would do it after you have run the chown commands on them in Terminal and then checked them...See Section below on that part.
Note: If you don't have and use Shell Files just ignore that section, it is for those who use Shell Files. If you don't know what Shell Files are you should also ignore that section.
Once you have created limit.maxfiles.plist and created limit.maxproc.plist
Then you go over carefully to make sure you did not make a mistake, me I copied and pasted the text I provided into each file and then I changed to filename extension on each file. Anyway now is a good time to verify accuracy.
Next Run the Terminal and did the chown commands and then you should go to the Finder.
Select limit.maxfiles.plist and then type command I or go to the File Menu and then choose Get Info, you will then get a window.
Scroll Down in the Get Info Window to Sharing & Permissions: you should see in columns Name: system; Privilege: Read & Write; Name: wheel Privilege: Read only; Name: everyone Privilege: Read only
Do the same procedure to limit.maxproc.plist and you should have the same results in Sharing & Permissions as for the other file.
Note: also in the Get Info Window both files should have Open with: Property List Editor.app (default)
If you see the same things that means that you did chown commands correctly, if you don't see the same permissions that I am seeing then it would mean that you did not do the commands correctly, try again.
Once you have verified that the files have the correct Permissions using Get Info, you then should put the files into <Mac's Hard Drive Name>/Library/LaunchDaemons and then you Restart.
Everything should work then.
Do let me know how it goes. I know it is not really Simple, but it did work for me and I am sure it will work for you too.
Navigation
[0] Message Index
[*] Previous page