Too many files open for writing (2.79)?

It happens only after a very, very long time of using Blender, mostly using Save over and over again. Eventually, the console spits out this error message:

OSError: [Errno 24] Too many open files ‘directory/name’
Unable to save ‘/tmp/insert name.blend’: Too many open files

After this, I can no longer save anything, I then have to lose whatever progress I made on the file. I remember on 2.49 you would get the error in the form of ‘Failed to write blend file. Unable to open.’ Upon quitting, you would also get ‘Unable to save tmp/quit.blend, check you have permissions’. Whats interesting, is that although this no longer occurs in the GE as of 2.6, Python scripts will not work whatsoever when this happens. Also in 2.49, sound would cut when this happened in the GE, and trying to save would delete the file. It no longer deletes the file in 2.7

I am using the Mac OSX version of 2.79
Since then, I haven’t come across this in a very long time (years).

Forgot to mention that I also get this in the terminal:

Traceback (most recent call last):
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 688, in exec_module
File “”, line 793, in get_code
File “”, line 845, in get_data

Its so weird…

Trying to quit Blender gives me these errors:

2019-09-03 15:09:40.256 blender[28965:903] Unable to read contents in the Interface Builder file at path /System/Library/Frameworks/AppKit.framework/Resources/English.lproj/NSAlertPanel.nib due to error: The operation couldn\U2019t be completed. (NSCocoaErrorDomain error 256.).
2019-09-03 15:09:40.258 blender[28965:903] Cannot load Interface Builder file ‘/System/Library/Frameworks/AppKit.framework/Resources/English.lproj/NSAlertPanel.nib’

2019-09-03 15:09:43.370 blender[28965:903] Cannot load Interface Builder file ‘NSAlertPanel’
2019-09-03 15:09:46.770 blender[28965:903] Cannot load Interface Builder file ‘NSAlertPanel’
2019-09-03 15:09:47.930 blender[28965:903] Cannot load Interface Builder file ‘NSAlertPanel’
2019-09-03 15:09:46.770 blender[28965:903] Cannot load Interface Builder file ‘NSAlertPanel’
2019-09-03 15:09

Why does this happen?
It seems to be extremely rare now…