You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Sylvain Beaumont <sb...@kheops-tech.com> on 2003/01/15 21:12:11 UTC
Urgent: Tomcat dies with socket exceptions !
Hi,
We developped a GIS server, in which a embedded Tomcat serves JSP /
Servlet requests.
Since we upgraded Tomcat 3.x with 4.1.x (currently 4.1.12), Tomcat dies
with a SocketException.
Here is the exception:
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.d
oWrite(InternalOutputBuffer.java:652)
at
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOu
tputFilter.java:160)
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff
er.java:523)
at org.apache.coyote.Response.doWrite(Response.java:513)
at
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:
380)
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
at
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:413)
at
org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:394)
at
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.ja
va:110)
I started my server in debug mode (-debug + jdb) and I reproduce the
problem twice.
Here is the stack trace of a Tomcat thread trying to serve a page:
[1] java.net.SocketInputStream.socketRead0 (native method)
[2] java.net.SocketInputStream.read (SocketInputStream.java:129)
[3] org.apache.coyote.http11.InternalInputBuffer.fill
(InternalInputBuffer.java:767)
[4] org.apache.coyote.http11.InternalInputBuffer.parseRequestLine
(InternalInputBuffer.java:428)
[5] org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:382)
[6]
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection (Http11Protocol.java:380)
[7] org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:508)
[8] org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:533)
[9] java.lang.Thread.run (Thread.java:536)
Our demo server (Linux, 1.4.1), which in not under heavy loads (< 100
requests / day), hangs every week.
It also happened on 3 development PC (Win XP, 1.4.1) after a couple of
hours of tests.
- It is not related to SSL problems reported lately
- It doesn't seem to be related to database access:
- it happened on simple JSP pages displaying live memory data
(no DB access)
- the same setup was working using Tomcat 3.x (not sure about
4.0.x)
Any ideas / suggestions would be appreciated,
thank you,
Sylvain
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Urgent: Tomcat dies with socket exceptions !
Posted by Remy Maucherat <re...@apache.org>.
Sylvain Beaumont wrote:
>
> Hi,
>
> We developped a GIS server, in which a embedded Tomcat serves JSP /
> Servlet requests.
> Since we upgraded Tomcat 3.x with 4.1.x (currently 4.1.12), Tomcat dies
> with a SocketException.
> Here is the exception:
>
> java.net.SocketException: Connection reset by peer: socket write error
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> at
> java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> at
> org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.d
> oWrite(InternalOutputBuffer.java:652)
> at
> org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOu
> tputFilter.java:160)
> at
> org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff
> er.java:523)
> at org.apache.coyote.Response.doWrite(Response.java:513)
> at
> org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:
> 380)
> at
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
> at
> org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:413)
> at
> org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:394)
> at
> org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.ja
> va:110)
>
> I started my server in debug mode (-debug + jdb) and I reproduce the
> problem twice.
> Here is the stack trace of a Tomcat thread trying to serve a page:
>
> [1] java.net.SocketInputStream.socketRead0 (native method)
> [2] java.net.SocketInputStream.read (SocketInputStream.java:129)
> [3] org.apache.coyote.http11.InternalInputBuffer.fill
> (InternalInputBuffer.java:767)
> [4] org.apache.coyote.http11.InternalInputBuffer.parseRequestLine
> (InternalInputBuffer.java:428)
> [5] org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:382)
> [6]
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection (Http11Protocol.java:380)
> [7] org.apache.tomcat.util.net.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java:508)
> [8] org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:533)
> [9] java.lang.Thread.run (Thread.java:536)
>
> Our demo server (Linux, 1.4.1), which in not under heavy loads (< 100
> requests / day), hangs every week.
> It also happened on 3 development PC (Win XP, 1.4.1) after a couple of
> hours of tests.
>
> - It is not related to SSL problems reported lately
> - It doesn't seem to be related to database access:
> - it happened on simple JSP pages displaying live memory data
> (no DB access)
> - the same setup was working using Tomcat 3.x (not sure about
> 4.0.x)
>
> Any ideas / suggestions would be appreciated,
Please post this on tomcat-user.
Other than I have to take your word that "Tomcat is hanging", the traces
look normal. The first stack trace would happen with a client disconnect
(but is not logged anymore in 4.1.18). As for the thread stack, it is
typical of a connection being persisted. There was a bug with that
before 4.1.18, as the socket timeout was incorrectly set.
You should upgrade to 4.1.18 or 4.1.19.
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>