Whenever I am running more than 4000 threads, a testing application(jmeter) throws Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread in thread Thread[StandardJMeterEngine,5,main]. See log file for details.
There is an upper cap of 4000 on the number of maximum processes on macBook Pro M1 which I found using sudo launchctl limit maxproc
.
Response of given cmd: maxproc 2666 4000
I have a RAM of 16GB. Can anyone suggest how can I increase the max processes.