Tuesday, July 26, 2016

[WSO2][ESB] Set Timeout value of transport sender

Hi all,

In this blog post, indicating about set the timeout value of transport sender. By default, it has a timeout period of 30000ms (30s).

Go to <ESB-Home>/repository/conf/axis2/axis2_blocking_client.xml and set the values as follows.

 <transportSender name="https">  
 ...  
 ...  
  <parameter name="SO_TIMEOUT">90000</parameter>  
  <parameter name="CONNECTION_TIMEOUT">90000</parameter>  
  ...  
  ...  
 </transportSender>   



Note: These values are not available in axis2_blocking_client.xml by default and you have to add them.



PS: This will be a possible solution for  "java.net.SocketTimeoutException: Read timed out" exception. 


 java.net.SocketTimeoutException: Read timed out  
 at java.net.SocketInputStream.socketRead0(Native Method)  
 at java.net.SocketInputStream.read(SocketInputStream.java:129)  
 at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)  
 at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)