0
votes

I am trying to run a load test for a application. For this i am using JMeter (v4 & v5) on linux Red hat 7.5 Vm with 16GB Ram and 8vCPU power. Goal is to reach 20k Users connected via µ-service.

However during the test runs i get the following errors on the console: Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread.

Here is my jvm jmeter configuration : cat bin/jmeter | grep HEAP

HEAP (Optional) Java runtime options for memory management

: "${HEAP:="-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m"}"

Any ideas? I tried changing the heap size in jmeter, but that didn't seem to help at all.

1
this is error on log :Sami

1 Answers

0
votes

unable to create new native thread is not something you can work around by increasing JVM Heap, you're going above maximum number of threads threshold which is defined on OS level.

You will need to amend nproc value via ulimit command or by modifying /etc/security/limits.conf file to look like:

your_user           soft    nproc          1024
your_user           hard    nproc          32768

Reference: Unable to create new native thread

If you will be still receiving this error after raising maximum number of processes on OS level - most probably you will have to go for Distributed Testing