Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode server bot failing test action because "Too many open files in system."

The error I'm seeing is as follows:

Test target PrototypeTests encountered an error (The operation couldn’t be completed. Too many open files in system. Too many open files in system)
Test target Prototype Integration Tests encountered an error (The operation couldn’t be completed. Too many open files in system. Too many open files in system)

I am able to run the analyze and archive actions with no problems but enabling the test action causes the above errors. I've even tried this with empty tests and the problem still persists.

The output of sudo launchctl limit maxfiles on my server is:

maxfiles    256            unlimited      

Please let me know if I can provide any more information.

like image 445
JaKXz Avatar asked Apr 22 '14 21:04

JaKXz


1 Answers

You need to increase your ulimit. You should add the line:

ulimit -n 4096

in your ~/.profile or similar.

The reason you have to add this line to your bash launch file is because just running sudo ulimit -n 4096 will only change the limit in current bash session.

like image 109
penguinmaster Avatar answered Sep 19 '22 14:09

penguinmaster