When running PHP commands, you see an error similar to the following:
failed to open stream: Too many open files
Find and follow a tutorial for your respective operating system (MacOS or Linux) to increase the open files limit:
Operating systems impose a limit on the number of files and processes that can be opened at once by a given process. You have set this limit too low, and must increase it.