jmeter运行报错:JMeter: Uncaught exception: java.lang.OutOfMemoryError: Java heap spacer...如何解决

jmeter运行脚本报错如下:

2020-07-23 14:34:59,297 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2020-07-23 14:34:59,297 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-07-23 14:34:59,297 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-07-23 14:34:59,297 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2020-07-23 14:34:59,297 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2020-07-23 14:34:59,547 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2020-07-23 14:34:59,767 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : detection_ios_test_01
2020-07-23 14:34:59,767 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group detection_ios_test_01.
2020-07-23 14:34:59,767 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2020-07-23 14:34:59,767 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2020-07-23 14:34:59,777 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2020-07-23 14:34:59,777 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2020-07-23 14:34:59,787 INFO o.a.j.t.JMeterThread: Thread started: detection_ios_test_01 1-1
2020-07-23 14:34:59,797 INFO o.a.j.p.h.s.HTTPHCAbstractImpl: Local host = huxuejing
2020-07-23 14:34:59,807 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request retry count = 0
2020-07-23 14:34:59,837 INFO o.a.j.p.h.s.h.LazyLayeredConnectionSocketFactory: Setting up HTTPS TrustAll Socket Factory
2020-07-23 14:34:59,837 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS
2020-07-23 14:34:59,837 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread
2020-07-23 14:34:59,847 INFO o.a.j.u.SSLManager: JmeterKeyStore Location:  type JKS
2020-07-23 14:34:59,847 INFO o.a.j.u.SSLManager: KeyStore created OK
2020-07-23 14:34:59,847 WARN o.a.j.u.SSLManager: Keystore file not found, loading empty keystore
2020-07-23 14:35:30,870 INFO o.a.j.t.JMeterThread: Thread finished: detection_ios_test_01 1-1
2020-07-23 14:35:30,870 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3236) ~[?:1.8.0_171]
	at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) ~[?:1.8.0_171]
	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) ~[?:1.8.0_171]
	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) ~[?:1.8.0_171]
	at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:78) ~[?:1.8.0_171]
	at org.apache.jmeter.protocol.http.sampler.PostWriter.writeFileToStream(PostWriter.java:420) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.PostWriter.sendPostData(PostWriter.java:123) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sendPostData(HTTPJavaImpl.java:112) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:563) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220) ~[ApacheJMeter_http.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
2020-07-23 14:35:30,880 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2020-07-23 14:35:30,880 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

解决:
打开此文件
jmeter运行报错:JMeter: Uncaught exception: java.lang.OutOfMemoryError: Java heap spacer...如何解决_第1张图片

修改此信息
jmeter运行报错:JMeter: Uncaught exception: java.lang.OutOfMemoryError: Java heap spacer...如何解决_第2张图片
保存后重启jmeter再次运行成功

你可能感兴趣的:(jmeter)