压力测试Apache Tomcat应用程序

时间:2018-01-30 10:32:48

标签: tomcat jmeter stress-testing

我如何压力测试apache tomcat app?我尝试使用Jmeter但是在一定数量的用户之后我收到了错误。

org.apache.http.TruncatedChunkException: Truncated chunk ( expected size: 8094; actual size: 6479) at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:198) at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135) at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:148) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.readResponse(HTTPSamplerBase.java:1814) at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.readResponse(HTTPAbstractImpl.java:440) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:433) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1542) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1636) at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:519) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:493) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178) at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:491) at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:425) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:254) at java.lang.Thread.run(Unknown Source)

1 个答案:

答案 0 :(得分:0)

stacktrace告诉你你的tomcat(可能是底层应用程序)正在返回损坏的响应(你是否面对OOM?)这可能表明tomcat端存在性能问题(这是你对负载测试的期望)。

但是在开始调整你关注的Tomcat之前确保: