Support Article

java.net.SocketTimeoutException: Read timed out exception in log

SA-25354

Summary



A systems administrator has received numerous complaints from the business regarding an error message appearing on the user screen.  When the error occurs, the user loses their work in the current business session.


Error Messages



The error message tha appears on screen is:

java.net.SocketTimeoutException: Read timed out exception

From the Pega Logfile, the same error message is isolated:

2016-06-27 09:33:08,973 [00.140.79-80-exec-73] [          ] [                    ] [                    ] (      web.impl.WebStandardImpl) ERROR   - <IPADDRESS>: Problem retrieving input data:
java.net.SocketTimeoutException: Read timed out
                at java.net.SocketInputStream.socketRead0(Native Method)
                at java.net.SocketInputStream.read(Unknown Source)
                at java.net.SocketInputStream.read(Unknown Source)
                at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:535)
                at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:504)
                at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:566)
                at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:137)
                at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:348)
                at org.apache.coyote.Request.doRead(Request.java:422)
                at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
                at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:449)
                at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315)
                at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:200)
                at com.pega.pegarules.web.impl.HttpUtilities.getPostBytes(HttpUtilities.java:556)
                at com.pega.pegarules.web.impl.HttpUtilities.extractRequest(HttpUtilities.java:266)
                at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:524)


This same error message is identified in the Pega ALERT log as an EXCP0001 ALERT.


Steps to Reproduce



Unknown.  This error seemingly appears at random on the user screen.  However, it is noted that this error occurs in the Pega logfile at the same time.


Root Cause



This problem is caused by an environment issue, such as:

- Server is trying to read data from the request, but its taking longer than the timeout value for the data to arrive from the client. Timeout here would typically be tomcat connector -> connectionTimeout attribute.
- Client has a read timeout set, and server is taking longer than that to respond.
- This error can happen with high concurrency if the keepalive is enabled.


Resolution



A possible solution for this problem within the Tomcat web application is to modify the CONTEXT.XML file, and modify the CONNECTOR definition that governs the workstation browser connectivity to the Tomcat server.

    <Connector port="7181" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="7182"
               enableLookups="true"
    />


Specifically, modify the connectionTimeout value.  Increase this value to supress the error condition.

Published July 7, 2016 - Updated August 12, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.