Search code examples
jmeterjmeter-plugins

Uncaught Exception java.lang.OutOfMemoryError: "unable to create new native thread" error occurring while running jmeter in non gui mode


My scenario,

Step1: I have set my thread group for 1000:threads & 500:seconds
Step2:Configure heep space : HEAP=-Xms1024m -Xmx1024m
Step3:Now, running jmeter for non gui mode. In this scenario,"Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread" error occuring in my system.

My system configuration

Processor:Intel® Pentium(R) CPU G2010 @ 2.80GHz × 2
OS Type:32 bit
Disc:252.6GB
Memory:3.4 GiB

kindly give me a solution for this scenario.

Thanks, Vairamuthu.


Solution

  • Your issue is due to using a 32 bit OS, in this mode you are limited both in what you can allocate as Heap (depending on OS you will not be able to exceed 1.6 to 2.1 g) and native threads creation.

    I'd suggest switching to 64 Bits OS + 64 bits Jdk.

    But if you don't have any other option try setting in jmeter.sh in JVM_ARGS:

    -Xss128k

    Or if too low:

    -Xss256k