I am facing below OutOfMemor errors, and JMeter stops working....
java.lang.OutOfMemoryError: Java heap space Dumping heap to
java_pid4412.hprof ... Heap
A lot of these answers are out-of-date. Currently using jmeter v5.1.1 r1855137:
# Set var to increase available memory
JVM_ARGS="-Xms2048m -Xmx4096m"
# Run jmeter via sh script, e.g.:
/jmeter/5.1.1/libexec/bin/jmeter.sh -n -t testfile.jmx -l results.jtl -j log.txt
You can verify that the increase in memory is available via the log.txt file, which will show the following using the values above:
INFO o.a.j.JMeter: Max memory =3817865216