Forum Discussion

JonathanM's avatar
JonathanM
Occasional Contributor
13 years ago

[Resolved] Socket Timeout being ignored

Hey,

If my call takes longer than 30 seconds to return then SoapUI times out. I have tried updating the Socket Timout value under Preferences and also in the Options of my testcase to values such as 0, 120000 and 300000, but each time it still times out after 30 seconds. Any advice on how to fix this?

I am using SoapUI Pro 4.5.1

Thanks
  • JonathanM's avatar
    JonathanM
    Occasional Contributor
    As my post has had no response, I can only assume I have not provided enough information. Is there any further information required here for me to get help?

    Is there a support email address in which I can send this query to so I may get a response quicker?

    Thanks
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I'm sorry for the delayed response... could you try specifying the timeout in the "Timeout" property of your request (in the bottom left table of properties...) - in milliseconds.

    Does that work any better!?

    regards,

    /Ole
    SmartBear Software
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    hmm... the timeout value specified in soapUI is how long soapUI waits for a response once the connection has been established - could the timeout you are experiencing be the actual connection timeout (ie while soapUI waits to establish the connection to the server) - this is fixed at 30 seconds.. !?

    regards,

    /Ole
    SmartBear Software
  • JonathanM's avatar
    JonathanM
    Occasional Contributor
    I have confirmed with our developers that the code will not time out for these calls. The logs on our systems do not indicate the call timing out either. It appears to be something within SoapUI doing it, but I am unable to locate what it is
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    hmm.. exactly what error/message do you get in soapUI when the request times out?

    /Ole
    SmartBear Software
  • JonathanM's avatar
    JonathanM
    Occasional Contributor
    Found more info in the error. Hadn't noticed it before.

    The issue appears to be connected with Apache. I have looked over the apache settings and the timeout is 5 minutes so I would expect it to occur. Hoping you have seen this before to give advice:

    Wed Sep 05 11:20:52 BST 2012:ERROR:org.apache.http.client.ClientProtocolException
    org.apache.http.client.ClientProtocolException
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:236)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:345)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:241)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(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)
    Caused by: org.apache.http.ProtocolException: Content-Length header already present
    at org.apache.http.protocol.RequestContent.process(RequestContent.java:67)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
    at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.preProcess(HttpClientSupport.java:106)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:452)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    ... 11 more
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hmm... this is strange.

    I'm using the latest nightly build of soapUI and have set the Socket Timeout property in the soapUI Preference dialog to a large number such as 100000 (100 sec). Then I created a simple MockService and in the script tab on the MockResponse added
    while(true){}
    . this will basically make the MockService take forever to respond. Then I called the MockService and soapUI did indeed wait for 100 seconds before timing out.

    Could you try to replicate what I've done and see if you get the same results?
    Could it be anything between soapUI and your server that may cause the timeout, such as a proxy?

    --

    Regards
    Erik, SmartBear Support
  • JonathanM's avatar
    JonathanM
    Occasional Contributor
    Finally got to the bottom of it. Someone added a timeout into apache without telling me. Sorry to have wasted your time