Some of our WebMaker forms (v7 from BizFlow 12.3) call SOAP web services and we intermittently have the calls hang and we believe it's a problem on the service side that we have no control over. A thread dump of the Tomcat process shows the thread waiting on socket IO.
Is there a way to set a read timeout for the calls that originate from Java2HTTP#sendMessage?
Thread Dump:
Is there a way to set a read timeout for the calls that originate from Java2HTTP#sendMessage?
Thread Dump:
"http-bio-443-exec-922" daemon prio=6 tid=0x582c3400 nid=0x1158 runnable [0x60c2d000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
at org.apache.http.impl.conn.LoggingSessionInputBuffer.readLine(LoggingSessionInputBuffer.java:115)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at com.hyfinity.xgate.Java2HTTP.sendMessage(Java2HTTP.java:1026)
at com.hyfinity.xgate.Java2HTTP.sendSOAPMessage(Java2HTTP.java:1134)
at com.hyfinity.xagent.SOAPXAgent.service(SOAPXAgent.java:85)
....
....
....
RE: Timeout for web service calls
Please have a look at the second half of this documentation page:
http://www.hyfinity.net/mvcdocumentation_v7/Morphyc/XDE%20User%20Guide/Web%20Service%20Proxy%20-%20Advanced%20Configuration.html
This shows how you can setup an additional file to configure details for the connection, including the timeout values you wish to use.
Please note, that the pages that this links to in the HttpClient documentation have been changed since the documentation was published. I would suggest using the following links instead to find out the details of the available parameters that can be set:
http://hc.apache.org/httpcomponents-client-4.2.x/tutorial/html/connmgmt.html#d5e399
https://hc.apache.org/httpcomponents-client-4.2.x/tutorial/html/fundamentals.html#d5e338
I hope this helps.
Please let me know if you have any further questions.
Regards,
Gerard
RE: Timeout for web service calls