How to run load test for 3000 users with 50 loops in jmeter?

Viewed 123

I tried to run a load test in jmeter with 3000 users and 50 loops.But it shows this error.

[9.746s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 4k, detached.
Uncaught Exception java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached in thread Thread[StandardJMeterEngine,5,main]. See log file for details.

I also tried to increase the Heap size using- HEAP:="-Xms2g -Xmx2g -XX:MaxMetaspaceSize=2g"

But the same issue of OutOfMemory persits. Laptop's RAM - 8GB Thanks for the help

1 Answers

I don't think amending heap will help, the root cause of this error is that underlying operating system isn't capable of creating a new thread.

  • If you're using 32-bit Java - upgrade to 64-bit server JRE
  • If you're running Linux - check max user processes value using ulimit command
  • Reduce stack size via -Xss option

If you already tried everything - the only workaround would be installing JMeter on one more machine and go for Distributed Testing

Related