Web services timeout.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

We have recently set up inter app communication between our app and a third party app on different server using web-services.
When our server is shut down, or their server is unavailable, the web service activate hangs or waits for 'too long' before carrying on. (We are unsure which, as the user gives up and crashes out of the system).

Is there something in the WSDL, or some other configuration setting we can manipulate to cause the call to time out faster? We'd prefer it to fail and carry on, than hold the user up.

8 Comments

  1. Hi,

    I don't know if I understand your question, perhaps my suggestions just add some more questions and problems. However I'm very interested in this as we already use some application critical web-services. Sooner or later I have to start investigating timeouts etc.....

    I have noticed that our Uniface web service call-outs, are very slow the first time they access a web-service. After the first successful slow call-out, the following call-outs are very fast (whatever operation being accessed). So to avoid the slowness at some critical point, I usually call some easy CheckService-operation of the web-service, at some noncritical point of our application, just to "initiate" the web-service. If I remember right my investigations (before my summer vacation), indicated that this should usually be corrected by the client-settings, so that not even the first call-out would be too slow. I don't remember where my investigations pointed, but I remeber that I hadn't found a solution using Uniface settings.

    Regarding the timeout, have you tried the rto-parameter (and cto-parameter).

    USYS$SOP_PARAMS {=} {puser=ProxyServerUserID} {, ppass=ProxyServerPassword} {, euser=WebServerUserID} {, epass=WebServerPassword} {, scheme=AuthScheme} {, proxy=ProxySpec} {, cto=ConnectionTimeOut} {, rto=RequestTimeOut} {ign=IgnoredVerificationMethod} , callback=CallbackServices

    rto

    Time-out for the request, in milliseconds; default is 30,000 milliseconds. This option applies only after the server is connected. It applies only to clients running on Microsoft Windows XP, Windows 2000, or Windows NT 4.0.

    Regards RogerW.

     


    Author: rogerw (roger.wallin@abilita.fi)
  2. Hi, I still have this annoying problem, the web-service call-out from Uniface is very slow as an web-service operation is called for the first time. After that, whatever operation of the web-service is called, Uniface call out is very fast. If you restart the Uniface client application, the first call out is again very slow. The web-service called is not a Uniface-program. Looking at wireshark, Uniface is of course doing a lot more the first time it's calling out, but the big problem is what Uniface-client is doing for approx 7 seconds before anything is sent (seen on wireshark)? The first call out: Uniface client is sending nothing for 7 seconds, then sending a lot within 2-3 seconds and gets the answer. The following call outs: Uniface client sends less and gets answer within 1 second. The 2-3 seconds aren't a problem, but the initial 7 seconds are a problem, especially as nothing is seen being sent during those 7 seconds. Any advice appreciated! Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  3. I've just stumbled upon this topic by chance. Maybe this is info is still useful for some of you: a web service activate can cause Uniface to hang when the server does not return the WSDL as expected. At this moment there's no specific timeout to cover this scenario. And the problem has bee recognized as BUG 30944 (Web Service Call-Out: Uniface hangs when WSDL not returned correctly by server). We currently have no planning when this issue could be resolved. But there's a (rather) simple workaround for this: use a local copy of the WSDL file (instead of accessing it from the server). Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. rogerw said Hi, I still have this annoying problem, the web-service call-out from Uniface is very slow as an web-service operation is called for the first time. After that, whatever operation of the web-service is called, Uniface call out is very fast. If you restart the Uniface client application, the first call out is again very slow. The web-service called is not a Uniface-program. Looking at wireshark, Uniface is of course doing a lot more the first time it's calling out, but the big problem is what Uniface-client is doing for approx 7 seconds before anything is sent (seen on wireshark)? The first call out: Uniface client is sending nothing for 7 seconds, then sending a lot within 2-3 seconds and gets the answer. The following call outs: Uniface client sends less and gets answer within 1 second. The 2-3 seconds aren't a problem, but the initial 7 seconds are a problem, especially as nothing is seen being sent during those 7 seconds. Any advice appreciated! Regards RogerW.

    Hi RogerW, Which Uniface version and patch level are you using? Maybe the following problem has something to do with the delay you are seeing?

    • BUG: 30602 - First webservice callout on Windows incurs a delay of 1 to 1.4 seconds

    The mentioned problem has been resolved with the version 9.6.06 patch X604 (and higher). Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  5. Hi Daniel, We do use 9.6.04.01 (1209_1), so I'll soon test a newer version. But the interval 1 to 1.4 seconds is in my case 5 to 10 seconds. The DNS lookup seems to be very fast. Regards Roger.


    Author: rogerw (roger.wallin@abilita.fi)
  6. rogerw said Hi Daniel, We do use 9.6.04.01 (1209_1), so I'll soon test a newer version. But the interval 1 to 1.4 seconds is in my case 5 to 10 seconds. The DNS lookup seems to be very fast. Regards Roger.

    Hi Roger, Thanks for your reply. I'm not sure if the mentioned delay of 1 to 1.4 seconds is carved in stone or if this is just the delay we've recognized while testing this matter (the delay could of course vary depending on the environment). I only know that the delay was actually caused by a problem in the libcurl library (that is used by the SOP U2.0 connector) and updating it to a later version resolved this issue. Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  7. Hi, I tried with version 9.6.07. It was much faster, ie. the initial needless 7 seconds have disappeared. The first call-out is still a bit slower than the following call-outs, but that's probably due to some wsdl-tracing etc. that has to be done. Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  8. rogerw said Hi, I tried with version 9.6.07. It was much faster, ie. the initial needless 7 seconds have disappeared. The first call-out is still a bit slower than the following call-outs, but that's probably due to some wsdl-tracing etc. that has to be done. Regards RogerW.

    Hi Roger, Thanks for the info. It's good to hear that the call-out is quicker with version 9.6.07. But the first call-out will always be a bit slower: modules need to be loaded and stuff needs to be initialized. All this overhead is not necessary anymore when doing the second or any subsequent call. Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)