Today, the non-gui method was used for pressure testing. When the pressure testing script was executed to 18 minutes, it suddenly reported java.lang.OutOfMemoryError. Baidu found out that it was a memory overflow. Various blogs on the Internet are all about linux and windows non-gui methods for setting heap and stack memory. No non-gui set heap and stack memory size found. It took me half an hour to find it. Later found on the window command line, the command is as follows:
jmeter -n -t D:/***目录**/**文件名**/.jmx -l result.jtl -e -o D:/***目录**/报告目录
Why is jmeter not jmeter.bat?
Then go to the jmeter root directory / bin
It turns out that this file is called in the Windows command line mode, and then open the file
Found this. Decisively-Xmx1g changed to 8g, this value is best not to exceed half of the computer's total memory. Change to the following, save
: "${HEAP:="-Xms1g -Xmx8g -XX:MaxMetaspaceSize=256m"}"
Perfect solution when running again! ! !
ps:
You can check whether the jmeter memory setting is successful through jconsole.exe