tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat pausing and no java process
Date Thu, 03 May 2012 14:59:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miguel,

On 5/3/12 10:28 AM, Miguel González Castaños wrote:
> On 03/05/2012 15:29, Pid wrote:
>> On 03/05/2012 11:35, Miguel González Castaños wrote:
>>> Dear all,
>>> 
>>> My Tomcat 5.5 server reports in catalina.out under heavy load
>>> that Tomcat is pausing. I checked and no java process was
>>> running and I had to start Tomcat manually.
>> Can you post an example of the message from catalina.out that
>> says Tomcat is pausing?
> May 3, 2012 8:40:10 AM org.apache.catalina.storeconfig.StoreLoader
> load INFO: Find registry server-registry.xml at classpath resource 
> May 3, 2012 8:40:10 AM org.apache.catalina.startup.Catalina start 
> INFO: Server startup in 5771 ms May 3, 2012 9:56:54 AM
> org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing
> Coyote HTTP/1.1 on http-80 May 3, 2012 9:56:54 AM
> org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing
> Coyote HTTP/1.1 on http-443 May 3, 2012 1:35:03 PM
> org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO:
> The Apache Tomcat Native library which allows optimal performance 
> in production environments was not found on the java.library.path: 
> /usr/bin/jdk1.5.0_17/jre/lib/i386/server:/usr/bin/jdk1.5.0_17/jre/lib/i386:/usr/bin/jdk1.5.0_17/jre/../lib/i386
>
>  May 3, 2012 1:35:03 PM org.apache.coyote.http11.Http11BaseProtocol
> init
> 
> I have just realized about that APR is missing, can be affecting to
> this issue?

Unlikely. If you are using SSL or serving large static files,
APR/tcnative should be something that you look into using.

Honestly, I would put more effort into upgrading to a more recent
version of Tomcat than looking into using APR/tcnative.

>>> No errors before in catalina.out. The only error found today
>>> (It crashed 3 times in 3 hours) was an outofmemory error.
>>> 
>>> I changed from 1024Mb to 1536Mb in catalina.sh:
>>> 
>>> CATALINA_OPTS="$CATALINA_OPTS -Xms1536m -Xmx1536m"
>> Do you actually have 2Gb of free RAM to assign to the Tomcat
>> process?
> 
> Well, the machine has 4 Gb and only runs MySQL and Tomcat.

I hope you have small indexes in MySQL :)

> I have installed javamelody an the thread count is around 120,
> reaching a max of 180. Memory usage grows very fast until Tomcat
> hangs. I suspect is an issue of the garbage collector and setting
> the heap memory too high.

If you suspect that you have set the heap memory too high, why are you
increasing it?

It really seems like you are just grasping at straws and trying
whatever technique comes to mind at the time. Stop. Instrument your
webapp. Take data. When you have something substantive, draw a
conclusion and confirm it. Only then should you take corrective
action. Right now, you are changing all sorts of things and you'll
never know what was the one thing that worked because you've changed
everything.

> I have reset it to 768 Mb and now the memory seems to keep quite 
> low, some people say that Tomcat 5.x doesn't like much more than 1
> Gb of heap memory and that GC is not doing his job:
> 
> http://serverfault.com/questions/281515/periodic-unresponsiveness-in-tomcat

Malarkey.
> 
Tomcat 5.5 doesn't really care what heap size it's got as
long as it's more than 4MiB or so. The page you referenced in here
doesn't even mention Tomcat 5.5.

Usually the GC does do its job properly, and that includes pausing the
whole JVM in order to reclaim memory if necessary. The above thread
from ServerFault is about unresponsiveness, not about OOME: the GC
caused unresponsiveness to avoid OOME (and it worked).

Stop making crazy claims and actually look at your own environment to
figure out what's going on.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+inVAACgkQ9CaO5/Lv0PB3PQCbBuaYoIurA30z8N3dtLElQXRf
MdAAnid8y+qveidJMq5j86946bVYD2Ip
=7lpb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message