0

I'm running a load test on camunda BPM engine's REST API using SoapUI Pro 5.1.2 and I get about 10-30% of failures with the following exception.

Mon Mar 30 11:53:48 PDT 2015:ERROR:java.net.SocketTimeoutException: Read timed out
   java.net.SocketTimeoutException: Read timed out
   	at java.net.SocketInputStream.socketRead0(Native Method)
   	at java.net.SocketInputStream.read(Unknown Source)
   	at java.net.SocketInputStream.read(Unknown Source)
   	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
   	at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
   	at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264)
   	at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
   	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
   	at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
   	at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
   	at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
   	at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doReceiveResponse(HttpClientSupport.java:147)
   	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
   	at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
   	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
   	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
   	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
   	at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:233)
   	at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:323)
   	at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:290)
   	at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:220)
   	at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
   	at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:80)
   	at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:192)
   	at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:793)
   	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:213)
   	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
   	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:139)
   	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
   	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129)
   	at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:490)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
   	at java.util.concurrent.FutureTask.run(Unknown Source)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   	at java.lang.Thread.run(Unknown Source)

Here's the load test scenario:

  • In my test case, I have a series of REST calls being done in sequence.
  • Load test attributes - Threads: 100, Startegy: Burst, Burst Delay: 10s, Burst Duration: 5s, Limit 1000 Total Runs.

I've tried setting the 'Socket Timeout' option of SoapUI to 300000 i.e 300 seconds and I see this is the only option I found on forums but I still get these errors. Also, as I mentioned, not all 1000 runs are failures, only 10-30 % of them fail randomly with this exception.

Sometimes, the load test succeeds with limiting the total runs to under 500 and even then, I get some of these errors and are occasional.

From the above trace, I understand the issue is at the client (SoupUI) side (or is my understanding not right?) and wanted to know how to get around this one?

2 Answers 2

0

If your process is synchronous the REST Call which starts the process will block until the process is completed. Which means if the process takes longer than your configured socket timeout the connection will be closed as no further data is expected on the socket. A solution would be to set the start event of your process to async so the REST call will immediately return. But I don't know if this fits your benchmark.

Sign up to request clarification or add additional context in comments.

3 Comments

That's an interesting option @sebastian-menski, thank you and will try setting the start event and other tasks to async a little later. My process is plain without any implementation or any variables and so my load test completes in less than a minute. And considering the socket timeout of 300secs that I've set on SoapUI, I'd really like to fix my test without changing my model because I believe there should be some configuration that I need to tweak either on SoapUI or on tomcat/camunda. I've tried to upvote but not allowed due to my points.
If your process is simple another issue can be that the thread pool of the tomcat and/or the connection pool of the database are to small. Maybe you could increase them first.
I've tried playing with async options but I might not have done it as expected as I'm relatively new to BPM world and Camunda. It didn't work. However, as mentioned in my answer, setting the socket timeout for the test case worked though its taking longer for increased number of threads and for this, I guess the reason you mentioned about thread pool/connection pool settings could be true. I'll give it a try, thank you.!
0

I've earlier set the socket timeout in the global settings of SoapUI but I found in a SmartBear forum that we have separate socket timeout option for the test case. It worked when I've set the timeout for the test case.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.