There is a limit to the number of files that may be opened by a single process on OSX, and it can be quite low. I had a problem working with a time series of tiles and had to increase my limits.
Try this on the command line so see some of the process limits:
ulimit -a
ulimit -Ha
launchctl limit maxfiles
If these limits are close to 2000, that could be your problem and it could be resolved through something like https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1 or http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/#Mac-OS-X
My current results for these are:
499 [drf@v21837 ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 2048
virtual memory (kbytes, -v) unlimited
500 [drf@v21837 ~]$ ulimit -Ha
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 65532
cpu time (seconds, -t) unlimited
max user processes (-u) 2048
virtual memory (kbytes, -v) unlimited
501 [drf@v21837 ~]$ launchctl limit maxfiles
maxfiles 65536 65536
502 [drf@v21837 ~]$
Note that the maxfiles == 65335
My machine's currently a Mac OSX 10.10.5 and I have a /Library/LaunchDaemons/limit.maxfiles.plist per the http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/#Mac-OS-X link like this:
512 [drf@v21837 ~]$ sed 's/^/ /' /Library/LaunchDaemons/limit.maxfiles.plist
<?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>