我正在使用soapUI中的camunda BPM引擎的REST API負載測試5.1.2,我也得到約10 30%的失敗有以下例外。與soapUI中測試Camunda REST API的性能 - java.net.SocketTimeoutException:讀超時
Mon Mar 30 11:53:48 PDT 2015:ERROR:java.net.SocketTimeoutException: Read timed out
java.net.SocketTimeoutException: Read timed out
\t at java.net.SocketInputStream.socketRead0(Native Method)
\t at java.net.SocketInputStream.read(Unknown Source)
\t at java.net.SocketInputStream.read(Unknown Source)
\t at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
\t at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
\t at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264)
\t at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
\t at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
\t at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
\t at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
\t at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
\t at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doReceiveResponse(HttpClientSupport.java:147)
\t at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
\t at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
\t at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
\t at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
\t at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
\t at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
\t at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
\t at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:290)
\t at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:220)
\t at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
\t at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:80)
\t at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:192)
\t at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:793)
\t at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:213)
\t at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
\t at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:139)
\t at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
\t at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129)
\t at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:490)
\t at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
\t at java.util.concurrent.FutureTask.run(Unknown Source)
\t at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
\t at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
\t at java.lang.Thread.run(Unknown Source)
這裏的負載測試場景:
- 在我的測試情況下,我有一系列的REST調用序列正在進行。
- 加載測試屬性 - 線程:100,啓動:爆發,爆發延遲:10秒,爆發持續時間:5秒,限制1000總運行。
我已經試過了SoapUI的「套接字超時」選項設置300000即300秒,我看這是我在論壇上找到,但我仍然得到這些錯誤的唯一選擇。另外,正如我所提到的,並不是所有的1000次運行都是失敗的,只有10%到30%的運行失敗。
有時,負載測試成功與限制總運行500以下,即使如此,我得到了一些這些錯誤,並偶爾。
從上面的跟蹤中,我瞭解問題出在客戶端(SoupUI)方面(或者我的理解不正確?),並想知道如何解決此問題?
這是一個有趣的選項@ sebastian-menski,謝謝你,並會嘗試設置開始事件和其他任務以稍後異步。我的過程很簡單,沒有任何實現或任何變量,因此我的負載測試在一分鐘內完成。考慮到我在SoapUI上設置的300secs的套接字超時,我真的很想修正我的測試而不改變我的模型,因爲我相信應該有一些配置需要在SoapUI或tomcat/camunda上進行調整。由於我的觀點,我嘗試過註冊但不允許。 – 2015-03-30 20:50:27
如果你的過程很簡單,另一個問題可能是tomcat的線程池和/或數據庫的連接池很小。也許你可以先增加它們。 – 2015-03-31 07:22:49
我試過玩異步選項,但我可能沒有按預期完成它,因爲我對BPM世界和Camunda相對較新。它沒有工作。然而,正如我的回答中所提到的,爲測試案例設置套接字超時的工作雖然需要更長的線程數量,爲此,我想你提到的關於線程池/連接池設置的原因可能是真的。我會試試看,謝謝。 – 2015-03-31 16:22:49