Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 9 Server: Unable to boot device due to insufficient system resources

I'm trying to run my unit tests on all device simulators from iOS 8.4 to 11.0 at the same time by checking the option 'Run test in parallel' when setting up the Xcode Bot. Unfortunately after trying to boot the 13th simulator it failes with the error message in the build log:

xcodebuild: error: Failed to build workspace xxxxx with scheme yyyyy.
Reason: Unable to boot device due to insufficient system resources.
Testing failed on 'iPhone 4s'

I'm running the server on a mac mini and i think it is just not capable to run so many simulators at the same time due to full memory.

Anyone experience with it?

like image 574
Lukas Würzburger Avatar asked Sep 22 '17 09:09

Lukas Würzburger


1 Answers

Increase the maximum number of processes until the next restart:

sudo launchctl limit maxproc 2000 2500

Increase the maximum number of open files until the next restart:

sudo launchctl limit maxfiles 2000 unlimited

For me it was the maximum number of processes that had to be increased. You might need even bigger numbers, those are just examples. Please refer to the documentation for more details.

Source: https://help.apple.com/simulator/mac/9.0/index.html#/dev8a5f2aa4e

like image 127
Erik B Avatar answered Oct 24 '22 04:10

Erik B