SocketTimeOutException

92 views
Skip to first unread message

hanson

unread,
Oct 3, 2008, 9:00:51 AM10/3/08
to Google Web Toolkit
I am developing a GWT-based client that accesses a database frequently
to
display status information about an application. After receiving the
response of
the RPC-request, the client displays the status information fetched,
checks if the application
has ended; if not, the client will send another request... and the
whole game repeats.

Technology used:
- Tomcat 1.6.0.14
- Java 5
- GWT 1.5.2, RPC

After a while - the elapsed time is not always the same - I get the
following exception:

29.09.2008 14:54:26 org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:
716)
at org.apache.coyote.http11.InternalInputBuffer
$InputStreamInputBuffer.doRead(InternalInputBuffer.java:746)
at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:
116)
at
org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:
675)
at org.apache.coyote.Request.doRead(Request.java:428)
at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:
297)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:
405)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:
312)
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
193)
at
com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils.java:
146)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent(RemoteServiceServlet.java:
335)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

I have to add that this exception never occured in hosted mode.

Solution attempt: Catch the InvocationException in the onFailure-
Method in AsyncCallback and post the request again. This makes my
status display work fine without any failure in hosted mode and on my
local tomcat. As soon as it is deployed on our productive Tomcat,
the same exception is thrown.

Similar problems have been described in
1.
http://groups.google.com/group/Google-Web-Toolkit/tree/browse_frm/month/2007-01/3e03ad1af5d5a179?rnum=151&_done=%2Fgroup%2FGoogle-Web-Toolkit%2Fbrowse_frm%2Fmonth%2F2007-01%3F

2. http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/8f2bb3dc5e5f42f7

... but none of them has provided any solution.

Any help will be appreciated.
Reply all
Reply to author
Forward
0 new messages