tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Birchler" <jrbirch...@attbi.com>
Subject RE: Tomcat eats 100% CPU !
Date Thu, 15 May 2003 00:50:34 GMT
There is much discussion here given to JK2. But, it comes in second place to
discussions about SSL. I have been programmatically monitoring various
topics for 9 months.

For my two cents, JK2 offers much more flexibility than what you suggest.
When you combine JK2 for multiple servers running Tomcat with Apache reverse
proxy, you can distribute applications across several machines. I have been
using JK2 for about a year with no problems. The biggest reason for all the
discussion is that people seem to have a hard time configuring it.


-----Original Message-----
From: Vic Cekvenich [mailto:vc@basebeans.com]
Sent: Tuesday, May 06, 2003 3:31 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: Tomcat eats 100% CPU !


Not BEA.
Just maybe Sun goes the way of DEC or DG, it's at $3 now, an my clients
will not have to change anything since no Iplanet or SPARC on site.
Also, the more people use other JVMs (there is an open source JDK 1.4,
as well http://www.kaffe.org, so 3 SDKs: IBM, BEA and kaffee are 1.4)
the better for open source, more choices. I would like for more options
and not complain about StringBuffer, etc., from Sun, because I think
Java != Sun.
Tomcat does run on many VMs, Sun is just one, I am not saying worst. But
everyone like jikes better, etc. BEA lets you distribute SDK, Sun does
not AFAIK. Also J::Rockit has a nice GC and remote monitoring of servers
VM built in.

Benchmarking is very important. So I use J:Rockit (and also Resin :-)

As far as frequent topic, this list I think has more jk2 topics than
any, which I consider bad practice, since Tomcat can redner html just
fine, not just jsp.

.V


Shapira, Yoav wrote:

>Howdy,
>I swear one could think you're a BEA employee seeing how frequently you
>hype JRockit ;)  Having JVM choice is a good thing ;)  Personally I
>don't like JRockit but I still benchmark with it for its potential (so
>far it hasn't been good enough for us to use in production) because
>benchmarking these things is important.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>
>
>>-----Original Message-----
>>From: Vic Cekvenich [mailto:vc@basebeans.com]
>>Sent: Tuesday, May 06, 2003 11:41 AM
>>To: tomcat-user@jakarta.apache.org
>>Subject: Re: Tomcat eats 100% CPU !
>>
>>Try J:Rockit VM used by BEA and Oracle/Orion. IBM uses IBM SDK (Jikes).
>>Only iPlanet uses SUN VM. Alll of them are JDK 1.4 compliant, I use
>>J:Rockit, its free and you can even distirbute SDK, not just JRE (Sun
>>only allows JRE).
>>http://commerce.bea.com/showallversions.jsp?family=WLJR
>>.V
>>
>>Mark Pease wrote:
>>
>>
>>
>>>If you use a lot of StringBuffers in your Java code, don't go to JDK
>>>
>>>
>1.4.1
>
>
>>-
>>
>>
>>>it will start your memory problems all over again!
>>>
>>>----- Original Message -----
>>>From: <yogi-ml@darkmag.net>
>>>To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>>>Sent: Tuesday, May 06, 2003 10:01 AM
>>>Subject: RE: Tomcat eats 100% CPU !
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Thx a lot, it works great. That's was indeed the problem, i've set
>>>>
>>>>
>the
>
>
>>>>memory up to 196m and it's as fast as on my development station !
>>>>
>>>>Gonna upgrade to TC 4.1 & JDK 1.4.1 soon..
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>In the hope this might help ...
>>>>>
>>>>>I used to have this problem with tc4.0... and jdk1.4.0
>>>>>Someone else on this group told me the problem went away when they
>>>>>
>>>>>
>went
>
>
>>>>>to jdk1.4.1 and tc4.1...
>>>>>I tried that and it made the difference !
>>>>>Don't know if you can get a later jvm/tomcat on the server though ??
>>>>>
>>>>>The problem seemed to be associated with garbage collection - the
>>>>>
>>>>>
>jvm
>
>
>>>>>would try to gc then go into a flat spin and not recover.
>>>>>
>>>>>It might be that upping the resources with -Xms and -Xmx would help.
>>>>>And by the way these are controlled by
>>>>>1) the CATALINA_OPTS environment variable (perhaps TOMCAT_OPTS for
>>>>>4.0?) for the batch file
>>>>>but by
>>>>>2) Registry keys for the NT service ...
>>>>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat
>>>>>4.1\Parameters,
>>>>>then JVM Option Number 0 etc (and don't forget JVMOptionCount) for
>>>>>tc4.1,
>>>>>can't remember what name the tc4.0 service is called, but you can
>>>>>probably hunt it down :)
>>>>>
>>>>>I can be more specific if you think this may help ...
>>>>>
>>>>>Christopher
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: yogi-ml@darkmag.net [mailto:yogi-ml@darkmag.net]
>>>>>>Sent: 06 May 2003 12:04
>>>>>>To: Tomcat Users List
>>>>>>Cc: Tomcat Users List
>>>>>>Subject: Re: Tomcat eats 100% CPU !
>>>>>>
>>>>>>
>>>>>>I forgot to say i'm launching the server's tomcat with a
>>>>>>batch file, and that's not consuming CPU only the first time
>>>>>>when compiling JSP - yes it does, but it also gets slow randomly :/
>>>>>>
>>>>>>Note also that the CPU load comes back to a normal ratio
>>>>>>after 25 or 30 seconds, in other word the behavior is normal
>>>>>>except it's anormally slow.
>>>>>>
>>>>>>Thx anyway, i'm still searching..
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I've come across this problem before.
>>>>>>>
>>>>>>>Our application used to exhibit this behavior  when running
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>tc as an
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>NT service. All would be fine until the server hit some
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>heavy load and
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>the CPU would shoot to 100% and never come back .
>>>>>>>
>>>>>>>When running tc from the batch file instead of as a service, the
>>>>>>>problem went away.
>>>>>>>
>>>>>>>Unfortunately I never got round to working out why this was
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>happening.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>The less time I spend on a windows machine the better!! I get
a
>>>>>>>headache....
>>>>>>>
>>>>>>>I know a couple of our customers use a third party tool to create
>>>>>>>
>>>>>>>
>a
>
>
>>>>>>>service instead of the one bundled with tc and this seemed
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>to work for
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>them.
>>>>>>>
>>>>>>>Steven Shand.
>>>>>>>
>>>>>>>
>>>>>>>On Tuesday, May 6, 2003, at 11:12  am, yogi-ml@darkmag.net wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hail,
>>>>>>>>
>>>>>>>>First of all, hello to everybody, i just subscribed to this
ML, i
>>>>>>>>guess it'll be more practical than Sun's forums to help, be
>>>>>>>>
>>>>>>>>
>helped
>
>
>>>>>>>>and exchange experiences/issues.
>>>>>>>>
>>>>>>>>To introduce myself, i'm a 23 years old french student in
>>>>>>>>
>>>>>>>>
>computer
>
>
>>>>>>>>science, and i actually work for my training course on a J2EE
web
>>>>>>>>application (with Tomcat :). I'm using PHP for 3 years, and
i'm
>>>>>>>>fairly newbie with JSP/Servlets as it's my first "real"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>project with
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>it !
>>>>>>>>
>>>>>>>>Now you're aware of who am i, let's go !
>>>>>>>>
>>>>>>>>I coded a webapp under Tomcat 4.1.18 with J2SE 1.4.1-1 and
J2EE
>>>>>>>>1.3.1, Oracle 9i, the whole on a PIV 2.4 Ghz / 512 Mb with
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>Windows XP
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>SP1.
>>>>>>>>
>>>>>>>>I use Javamail/JAF, JSP pages, servlets, taglibs ("simple"
tags
>>>>>>>>
>>>>>>>>
>or
>
>
>>>>>>>>body tags - 1.2 specs) and a datasource (an Oracle connection
>>>>>>>>
>>>>>>>>
>pool
>
>
>>>>>>>>(DBCP), with the patched classes12.jar for both Oracle 8i
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>& 9i). The
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>webapp is pretty
>>>>>>>>heavy (lots of SQL requests, dozen of tags + an
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>authentification layer
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>w/
>>>>>>>>sessions, and so more) but everything runs perfectly, it takes
>>>>>>>>approximately between 0.5 and 1 second to process and
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>generate the HTML
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>pages.
>>>>>>>>
>>>>>>>>As my webapp is finished, i'm trying to deploy it on my company's
>>>>>>>>server. It's a DELL server, with 512 Mb RAM running with
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>Windows NT 4
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>(don't know
>>>>>>>>the SP - i may check if necessary). I don't really know
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>what kind of
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>CPU
>>>>>>>>is it, but it's a huge monster. It's running Tomcat 4.0.3
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>LE with J2SE
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>1.4.0, and an Oracle 8.1.7.
>>>>>>>>
>>>>>>>>My problem is that sometime it's blazzing fast, sometime it's
>>>>>>>>horribly slow.. I mean, for a same page, it may be
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>processed in less
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>than 0.3 sec as it may be processed in 25 or 30 seconds..
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>In the last
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>case, the java.exe process (remember, Tomcat LE) takes 99%
of the
>>>>>>>>CPU, i really don't know what it's computing and what's
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>happening..
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>There's no timeout,
>>>>>>>>the pages is entirely generated, but it's slow !
>>>>>>>>
>>>>>>>>In all the cases, while processing a servlet or jsp script,
the
>>>>>>>>Oracle process don't consume lots of CPU (3 or 4%, not
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>more), i don't
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>think the problem comes from there.
>>>>>>>>
>>>>>>>>I tried J-Sprint to profile my webapp, but it didn't help
me
>>>>>>>>
>>>>>>>>
>much.
>
>
>>>>>>>>I really don't know what to do right now, the webapp should
be
>>>>>>>>released for 2 days, everything is ok except that..
>>>>>>>>
>>>>>>>>Any help/tip/advice/suggestion or eventually shotgun would
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>be GREATLY
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>appreciated !
>>>>>>>>
>>>>>>>>Thx a lot,
>>>>>>>>
>>>>>>>>YoGi
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>-------------------------------------------------------------------
>>>>>>
>>>>>>
>--
>
>
>>>>>>
>>>>>>
>>>>>>>>To unsubscribe, e-mail:
>>>>>>>>
>>>>>>>>
>tomcat-user-unsubscribe@jakarta.apache.org
>
>
>>>>>>>>For additional commands, e-mail:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>tomcat-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>-------------------------------------------------------------------
>>>>>>
>>>>>>
>--
>
>
>>>>>>
>>>>>>
>>>>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>>>>For additional commands, e-mail:
>>>>>>>
>>>>>>>
>tomcat-user-help@jakarta.apache.org
>
>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>-------------------------------------------------------------------
>>>>>>
>>>>>>
>--
>
>
>>>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail:
>>>>>>
>>>>>>
>tomcat-user-help@jakarta.apache.org
>
>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>--------------------------------------------------------------------
>>>>>
>>>>>
>-
>
>
>>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
>
>This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.
>
>


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


Mime
View raw message