You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Diego Manilla Suárez <di...@xeridia.com> on 2009/03/18 10:38:45 UTC
Tomcat hangs due to socket reads?
Hi everyone. I'm running Tomcat 5.0.30 + Apache 2.2.3 on a SuSE EL 10.
After a few days running, the CPU load increases, until Tomcat is eating
99% of it, and I need to restart. The last time this happened, I
executed jstack on the Tomcat VM, and I saw most of threads stacks are
like this:
##############################
Thread 26701: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor,
byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129
(Compiled frame)
- java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
- java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=256
(Compiled frame)
- java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=313
(Compiled frame)
-
org.apache.jk.common.ChannelSocket.read(org.apache.jk.core.MsgContext,
byte[], int, int) @bci=32, line=598 (Compiled frame)
- org.apache.jk.common.ChannelSocket.receive(org.apache.jk.core.Msg,
org.apache.jk.core.MsgContext) @bci=38, line=535 (Compiled frame)
-
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgContext)
@bci=28, line=663 (Compiled frame)
- org.apache.jk.common.SocketConnection.runIt(java.lang.Object[])
@bci=8, line=866 (Interpreted frame)
- org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()
@bci=167, line=684 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)
##############################
This makes me think there is some issues with Apache - Tomcat connection
or maybe some SO configuration, because the number of requests is not
that high.
This is the configuration of the AJP connector on server.xml:
##############################
<Connector port="8080"
maxThreads="10" minSpareThreads="1" maxSpareThreads="1"
enableLookups="false" acceptCount="100"
debug="0"
disableUploadTimeout="true" />
##############################
And the forwarding in Apache is done through mod_proxy_ajp, like this:
##############################
ProxyPass /frontdipuleon ajp://localhost:8009/myapp
ProxyPassReverse /frontdipuleon ajp://localhost:8009/myapp
##############################
Any idea on what can be wrong? The only thing I tried now is setting a
connectionTimeout on the AJP connector, but I think this wouldn't tell
me the real cause of these problems. What else should I check?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat hangs due to socket reads?
Posted by Diego Manilla Suárez <di...@xeridia.com>.
Hi André. That was just an error when copying and pasting, I picked up
the wrong connector. This is the right one:
##############################
<Connector port="8009"
minProcessors="5" maxProcessors="150"
enableLookups="false" redirectPort="443" debug="0"
protocol="AJP/1.3" />
##############################
Thanks for pointing that out.
André Warnier escribió:
> Diego Manilla Suárez wrote:
> [...]
> Hi.
> No idea about your problem, but in the information you provide, you
> are showing the Apache connecting to port 8009 of Tomcat, but for
> Tomcat you are showing the Connector that listens on port 8080.
> That's probably not very helpful.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
****
****
Re: Tomcat hangs due to socket reads?
Posted by André Warnier <aw...@ice-sa.com>.
Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you are
showing the Apache connecting to port 8009 of Tomcat, but for Tomcat you
are showing the Connector that listens on port 8080.
That's probably not very helpful.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org