Read timed out
I have a data collection servlet running on tomcat 5.5.12 and Windows 2003. It is used by about 200 clients. Every now and then I see the error below indicating that the server times out reading the HTTP request for the client. After some extensive investigation, what I know is: - the timeouts happen precisely after 10 or 20 sec - there is no garbage collection or CPU activity to account for the timeout - after digging through the Tomcat code, the default socket timeout is 0, so the timeout should never occur. - the server is a dual CPU high-end server, so load should not be a problem. I would guess the exception is misleading and the error is somewhere else? Any ideas? Thanks, Bogdan Calmac. java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:747) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:777) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:115) at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:712) at org.apache.coyote.Request.doRead(Request.java:427) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:283) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:379) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:298) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:192) at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io.InputStreamReader.read(Unknown Source) at java.io.BufferedReader.fill(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at com.knoa.server.thor.ThorInMessage.execute(ThorInMessage.java:158) at com.knoa.server.thor.ThorServlet.doPost(ThorServlet.java:373) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:204) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question : encounter java.net.SocketTimeoutException: Read timed out occasionally
Hi all, we are encountering java.net.SocketTimeoutException: Read timed out occasionally, wondering if it's something related to network problem, Would highly appreciate if someone can help, following are the program stack found in tomcat log for your reference : WARNING: Exception thrown whilst processing POSTed parameters java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) at java.io.BufferedInputStream.read(BufferedInputStream.java:313) at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:626) at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:564) at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:200) at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179) at org.apache.coyote.Request.doRead(Request.java:419) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:265) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:280) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193) ...skipping one line at org.apache.catalina.connector.Request.parseParameters(Request.java:2379) at org.apache.catalina.connector.Request.getParameter(Request.java:1005) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) -- -- -- Thanks & Best Regards. James Wang
Re: question : encounter java.net.SocketTimeoutException: Read timed out occasionally
James Wang wrote: > Hi all, > > we are encountering java.net.SocketTimeoutException: Read timed out > occasionally, > wondering if it's something related to network problem, > Would highly appreciate if someone can help, following are the program stack If the client is IE, the server httpd and you are using Keep-Alive try disabling it. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question : encounter java.net.SocketTimeoutException: Read timed out occasionally
Hi Mark, Thanks for your suggestion, Yes, we are using apache httpd and enable keep-alive (set 15 seconds), and most users are using IE, don't know why it happened to IE users only, would you please explain it to us more in details. another questions is if we disable the keep-alive, will it cause too many connections opened in our apache httpd servers. Thanks a lot & Best Regards. James Wang. On Fri, Sep 5, 2008 at 10:26 PM, Mark Thomas <[EMAIL PROTECTED]> wrote: > James Wang wrote: > > Hi all, > > > > we are encountering java.net.SocketTimeoutException: Read timed out > > occasionally, > > wondering if it's something related to network problem, > > Would highly appreciate if someone can help, following are the program > stack > If the client is IE, the server httpd and you are using Keep-Alive try > disabling it. > > Mark > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: question : encounter java.net.SocketTimeoutException: Read timed out occasionally
James Wang wrote: > Hi Mark, > Thanks for your suggestion, Yes, we are using apache httpd and enable > keep-alive (set 15 seconds), > and most users are using IE, don't know why it happened to IE users only, > would you please explain IE 'features' that don't follow the spec and therefore can cause problems. > it to us more in details. another questions is if we disable the > keep-alive, will it cause too many connections > opened in our apache httpd servers. Maybe. Try it an see. Alternatively, if there are no real problems, just ignore the error message. Mark > > Thanks a lot & Best Regards. > James Wang. > > On Fri, Sep 5, 2008 at 10:26 PM, Mark Thomas <[EMAIL PROTECTED]> wrote: > >> James Wang wrote: >>> Hi all, >>> >>> we are encountering java.net.SocketTimeoutException: Read timed out >>> occasionally, >>> wondering if it's something related to network problem, >>> Would highly appreciate if someone can help, following are the program >> stack >> If the client is IE, the server httpd and you are using Keep-Alive try >> disabling it. >> >> Mark >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]