Insimenator.org
August 14, 2020, 04:20:25 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Insim's annual Donation Drive is on! Click here for info and to toss some money our way.
 
  Home   Forum   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Getting past the 2000/11800 file limit  (Read 7866 times)
0 Members and 1 Guest are viewing this topic.
BeosBoxBoy
Silent

Gender: Male
Posts: 5021



View Profile WWW
« on: June 10, 2007, 08:51:12 pm »

The Aspyr version of The Sims 2 in an un-patched state with no expansion packs has
a 2000 download file limit.  the only way to get past this is to update The Sims 2
with the latest game patch from http://www.aspyr.com/

After patching or after installing any of the expansion packs there is a problem that
develops between 11800 to 12000 downloads.  To resolve this you will need a programme
that alows you to see and edit hidden system files, such as OnyX or any similar software,
and root access.

Log-in as root. Start OnyX and tell it to display hidden files.
Finder will restart, wait until Finder has restarted and completely displays
before proceeding.
 
Go into Macintosh HD and find the folder etc and open the file rc.local in text,
create this file if it does not already exist.

Add these lines or edit them if you have something similar.

   sysctl -w kern.maxfiles=102000
sysctl -w kern.maxfilesperproc=100000
You must set kern.maxfiles 2000 higher than kern.maxfilesperproc.
If you need to have more files open, use a higher number, example:
   sysctl -w kern.maxfiles=202000
sysctl -w kern.maxfilesperproc=200000
Save the file to your desktop (uncheck if no extension is provided, use ".txt" format)
then move it into the etc folder.
Return to OnyX and restore the settings to not show hidden files. Restart the computer.

This should get you up and running with the best advantages.

Credits: sakgonz (TSR Forum); alexpilgrim; luws (TSR Forum)

Note: more discussion on this topic can be located on the TSR forum at this thread: http://forums.thesimsresource.com/showthread.php?t=309256
Logged

"There is a certain elegance in wasting time. Any fool can waste money, but when you waste time you waste what is priceless."
-- Maugham, W. Somerset. Ashenden: Or the British Agent.
Mi-chii
Member

Posts: 418



View Profile WWW
« Reply #1 on: June 11, 2007, 06:16:41 am »

BBB, I have the basegame only, I have way more than 2000 downloads, and everything works completely fine. It's unpatched and working excellent. Just thought I'd add that Smiley Could be some have problems, and some don't.
Logged

Tied third place in Mr. Insimenator 2007
Join the Animal Army
Call me Michelle
lordtyger
Site Santa!
*
Gender: Male
Posts: 56



View Profile
« Reply #2 on: February 11, 2017, 05:11:20 pm »

in Yosemite and Newer versions of the Mac OS the method used to modify the Open Files Limit Has Changed. Use the instructions below:

Special Note: if you are running El Capitan or Later you need to do an extra step before you can do the following. So go to my post and disable System Integrety Protection here are the instructions:
http://www.insimenator.org/index.php/topic,115580.0.html

Adjusting Open File Limits in Yosemite {and Later}.

To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files.
The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following
XML configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>limit.maxfiles</string>
      <key>ProgramArguments</key>
        <array>
          <string>launchctl</string>
          <string>limit</string>
          <string>maxfiles</string>
          <string>65536</string>
          <string>65536</string>
        </array>
      <key>RunAtLoad</key>
        <true/>
      <key>ServiceIPC</key>
        <false/>
    </dict>
  </plist>

This will set the open files limit to 65536.
The second plist configuration file should be stored in /Library/LaunchDaemons/limit.maxproc.plist with the following
contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>limit.maxproc</string>
      <key>ProgramArguments</key>
        <array>
          <string>launchctl</string>
          <string>limit</string>
          <string>maxproc</string>
          <string>2048</string>
          <string>2048</string>
        </array>
      <key>RunAtLoad</key>
        <true />
      <key>ServiceIPC</key>
        <false />
    </dict>
  </plist>

Both plist files must be owned by root:wheel and have permissions -rw-r--r--.
These permissions should be in place by default, but you can ensure that they are in place by
running sudo chmod 644 <filename>. While the steps explained above will cause system-wide open file limits to be correctly set upon restart, you can apply them manually by running launchctl limit.

Easiest way to create the files named limit.maxfiles.plist and limit.maxproc.plist is to just copy and paste the xml code into a text file and save with the correct name and file extension.


Note: Once you have made your plist files and placed them in Library/LaunchDaemons you Must change the owner and group for the two files. Also you need to make sure that the files have the correct permission settings.

Terminal commands to do this are:

sudo chown root:wheel <PathToFile>
sudo chmod 0644 <PathToFile>

Probably the easiest way to enter the <PathToFile> would be to type the commands followed by a space and then drag the file into the open Terminal window and hit return.

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.
« Last Edit: March 21, 2020, 11:56:22 pm by lordtyger » Logged

Curiosity Killed the Cat, but Satisfaction Brought It Back.
lordtyger
Site Santa!
*
Gender: Male
Posts: 56



View Profile
« Reply #3 on: March 22, 2020, 12:00:53 am »

I want people to note that I Edited my instructions for Increasing the Mac's Maximum Open File Limit, because El Capitan and Later make it harder to modify the folder I am telling you all to modify. Separate instructions on how to get around the System Integrety Protection are here http://www.insimenator.org/index.php/topic,115580.0.html
Logged

Curiosity Killed the Cat, but Satisfaction Brought It Back.
mynamenotbob
Member

Posts: 1


View Profile
« Reply #4 on: March 30, 2020, 11:22:44 am »

Hello!!

When you are creating the plist file, what app are you using? This is my first time trying to code and I have no idea how to make the plist file with xml configuration! Very eager to sim during the quarantine haha, any help would be appreciated Smiley

Thank you!
Logged
bourgeoisbanana
Member

Posts: 1


View Profile
« Reply #5 on: March 30, 2020, 03:20:26 pm »

@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!
« Last Edit: March 30, 2020, 04:08:33 pm by bourgeoisbanana » Logged
lordtyger
Site Santa!
*
Gender: Male
Posts: 56



View Profile
« Reply #6 on: April 04, 2020, 08:46:04 am »

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

Curiosity Killed the Cat, but Satisfaction Brought It Back.
midnightrrider
Member

Gender: Female
Posts: 2



View Profile
« Reply #7 on: April 05, 2020, 04:32:24 am »

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.
« Last Edit: April 05, 2020, 05:00:34 am by midnightrrider » Logged

love... a sense based philosophy.
lordtyger
Site Santa!
*
Gender: Male
Posts: 56



View Profile
« Reply #8 on: April 06, 2020, 12:09:17 pm »

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

Curiosity Killed the Cat, but Satisfaction Brought It Back.
Pages: [1]
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.102 seconds with 31 queries.
SimplePortal 2.1.1