How to resolve SocketTimeoutException: Read timed out
Question
  • As per requirement I am required to make a REST API Call. To make call I am using Forge Component https://www.outsystems.com/forge/component-overview/427/ardohttp 
  • As per Request settings at "/etc/.java/.systemPrefs/outsystems/pref.xml" I have configured as  <entry key="OutSystems.HubEdition.RequestTimeout (DEFAULT)" value="410"/>
  • On calling I am getting "SocketTimeoutException: Read timed out" error after 63 Seconds of the call. 
  • Following is Stacktrace

"Read timed out

java.net.SocketTimeoutException: Read timed out

   at java.net.SocketInputStream.socketRead0(Native Method)

   at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)

   at java.net.SocketInputStream.read(SocketInputStream.java:170)

   at java.net.SocketInputStream.read(SocketInputStream.java:141)

   at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)

   at sun.security.ssl.InputRecord.read(InputRecord.java:503)

   at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)

   at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)

   at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)

   at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)

   at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)

   at java.io.BufferedInputStream.read(BufferedInputStream.java:345)

   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)

   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)

   at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)

   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)

   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)

   at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)

   at outsystems.nosardohttp.actions.HTTPProcessor.process_response(Unknown Source)

   at outsystems.nosardohttp.actions.HTTPProcessor.process(Unknown Source)


   at outsystems.nosardohttp.actions.ActHTTPPost.mosHTTPPost(Unknown Source)"



Can someone help to overcome this timeout?

I got the solution. 


From Extension code I got to know that Timeout can be set as Header Parameter


Setting Header Parameter before Call


After passing Timeout parameter I was able to increase the timeout. With this course of actions, I was able to resolve the issue.

Root cause: Bydefault 100 Seconds were set as timeout due to which HTTP call was timing out. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.