Issue
When running PHP commands, you see an error similar to the following:
failed to open stream: Too many open files
Resolution
Find and follow a tutorial for your respective operating system (MacOS or Linux) to increase the open files limit:
- https://rtcamp.com/tutorials/linux/increase-open-files-limit/
Cause
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.