To many open files in PHPUnit

To many open files in PHPUnit

Running bigger projects with more moving components leads to more files being used at one time by the system. This is in issue for example when running PHPUnit.

An error message you might get is:

failed to open dir: Too many open files

The amount of files you can have open at once is dependent on the operating system and might change between distributions or versions of the same operating system. With the following command you can increase the limit on Mac OS and Linux:

ulimit -n 5000