Search code examples
websphere-8httpconnectionsocket-timeout-exception

ReadTimeOut configuration in JEE Server


We are facing Async operation timeout issue while uploading files to the application. On checking the IBM WebSphere Application (8.5) server logs, we see that the exception is thrown exactly after 60 seconds. In WAS the HTTP Channel Inbound settings has a ReadTimeOut value of 60 seconds configured by default.

https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/urun_chain_typehttp.html

As per my understanding the whole flow works like this.

  1. HTTP Connection is established between the client and the server
  2. Client pushes the information to the destination URL
  3. The channels configured in IBM WAS reads the information from the connection stream and processes it.

Is this understanding correct or there is more to it?

If the client is unable to push all the information to the destination URL within 60 seconds, there can be a read timeout ?


Solution

  • Once a connection has been accepted, then the amount of time to read in the request is not 60 seconds total, but in general there can not be a 60 second gap between subsequent Reads. So individual Reads for more data will time out after60 seconds, but the overall time it takes for multiple Reads for the entire request can be larger than 60 seconds.

    The first Read on a connection is governed by the overall TCP Channel's Inactivity timeout: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/urun_chain_typetcp.html

    After that subsequent reads on an HTTP session are governed by the http Read timeout: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/urun_chain_typehttp.html