RE: OutOfMemoryError under high load

2003-06-11 Thread Ryan Chambers

Linux is the problem here. As you increase the mx JVM flag to be, the number of 
threads the java process can create decreases. This
not a tomcat thing but a java on linux thing. For example, setting mx to be 1028 
MBytes results in a thread ceiling of something
like 427, which is really low for any loaded tomcat server.

Unfortunately I don't have any solutions. You could switch to Unix, but that's hardly 
practical solution. I guess you could run two
tomcat instances on the same server and load-balance somehow, but that sounds tough 
too. I never solved this one myself.

-Original Message-
From: Ian McFarland [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 5:05 AM
To: Tomcat List
Cc: Ian McFarland
Subject: OutOfMemoryError under high load


Hello,

We're running into the following problem when our Tomcat instances are
under heavy load.

SEVERE: Caught exception executing
[EMAIL PROTECTED], terminating thread
java.lang.OutOfMemoryError: unable to create new native thread

The exception is always on thread creation, and correlates a condition
where the process count on the machine suddenly starts to ramp up from
a few hundred to a little above 1000 processes. (Load is fairly
constant during this time, and the condition always expresses itself at
right around the same level of traffic, about 6Mbps of throughput per
server.) There appears to be plenty of heap memory available when this
happens, so that coupled with the thread creation message leads us to
suspect that we're running into an OS tuning problem, instead of
specifically a problem with our app. (A radical rewrite of how our
domain objects are cached, and tuning of various caches to various
sizes, resulted in near identical performance, aside from large
differences in CPU utilization. This seems to further support this
conclusion.) Tuning maxProcessors and a variety of other parameters in
our app seems to have no discernible effect, neither beneficial nor
detrimental, beyond changes in CPU utilization, which always falls in a
band between 10 and 60%, depending on the tuning choices.

We're currently using Tomcat  4.1.13 under Linux 2.4.17 with Sun JDK
1.4.1_01. We've tuned all the obvious parameters, (ulimit -n and
/proc/sys/kernel/threads-max, for example,) or at least all the ones we
could think of. I think we're missing something obvious, and the OS is
not letting us spawn more threads. Anyone know what we're doing wrong?

Thanks in advance,
-Ian McFarland


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Too many processes

2003-03-24 Thread Ryan Chambers

Has anybody noticed that as you increase the -mx while running tomcat on
linux, the maximum number of threads decreases?

We have run tomcat on Debian linux with 2GB of real memory and we set a
run-time flag of -mx1024m. In this configuration, once the java process
reaches a certain number of threads (it's always the same number, I think
it's around 468), then it can't create any new threads. When this happens it
doesn't respond to any requests and requires a re-start. Reducing the mx
value increases the number of threads allowed before the java process craps
out, but then we get OutOfMemory exceptions, so we need that extra memory.

Does anybody know how to explain this? This problem isn't limited to just
tomcat, it affects any java process on linux, I've checked.

Ryan

-Original Message-
From: Davis, Jeremy [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 11:01 AM
To: 'Tomcat Users List'
Subject: RE: Too many processes


He is referring to the JVM parameters to limit the amount of memory the JVM
is allotted.  They are java command line parameters.  That will atleast give
you the direction for documentation.  java.sun.com search should result in
more detail for you.

Jeremy Davis
Senior Support Analyst
BPI Marketplace Integration
614.760.8941
1.800.436.8726 - Support Line


-Original Message-
From: Gaston Escobar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 1:20 PM
To: Tomcat Users List
Subject: RE: Too many processes


I couldn't find those parameters. Can you be a little bit more specific with
what you mean?
Thanks a lot

-Mensaje original-
De: Filip Hanik [mailto:[EMAIL PROTECTED]
Enviado el: Lunes, 24 de Marzo de 2003 03:04 p.m.
Para: Tomcat Users List
Asunto: RE: Too many processes


I believe on Linux, each process is a thread. So tomcat only starts one
process, but the PS command will list all the threads as separate processes.
So there is nothing to worry about.

If you want tomcat to use less memory, you can always configure the -ms -mx
parameters in catalina.sh

Filip

> -Original Message-
> From: Gaston Escobar [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2003 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: Too many processes
>
>
> I'm running tomcat in a Red Hat 7.2. It works well when it is
> started, but
> it starts too many concurrent processes and it starts using
> more and more
> memory until it reaches 31% of my computer's memory.
> How can I configure Tomcat to run less concurrent processes
> and without
> using so much memory?
>
>
> This is the output of ps -aux
>
> root 21983 27.2 15.6 243620 39724 pts/0  S14:39   0:19
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21984  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21985  4.6 15.6 243620 39724 pts/0  S14:39   0:03
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21986  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21987  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21988  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21989  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21990  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21991  5.6 15.6 243620 39724 pts/0  S14:39   0:03
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21993  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21994  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21995  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 21996  0.0 15.6 243620 39724 pts/0  S14:39   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22002  0.0 15.6 243620 39724 pts/0  S14:40   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22003  0.0 15.6 243620 39724 pts/0  S14:40   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22004  0.0 15.6 243620 39724 pts/0  S14:40   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22005  0.0 15.6 243620 39724 pts/0  S14:40   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22006  0.0 15.6 243620 39724 pts/0  S14:40   0:00
> /usr/java/j2sdk1.4.1_01/bin/java -Djava.endorsed.dirs=/usr/Tomc
> root 22007  0.0 15.6 243620 39724 pts/0  S14:40  

RE: [OT] free Database with Transaction (Sorry for the noise)

2003-02-18 Thread Ryan Chambers

I can't argue with Oracle. But not all of us have $100,000 lying around to
buy an Oracle license. :)

-Original Message-
From: Mike Jackson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 11:29 AM
To: Tomcat Users List
Subject: RE: [OT] free Database with Transaction (Sorry for the noise)


If I'm going to go to that size I'd rather run Oracle.  But if it's
something
small hypersonic is great.

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

> -Original Message-
> From: Ryan Chambers [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 11:26 AM
> To: Tomcat Users List
> Subject: RE: [OT] free Database with Transaction (Sorry for the noise)
>
>
>
> For an industrial strength open-source DB, try
> http://postgresql.org
>
>
>
> -Original Message-
> From: Mike Jackson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 11:14 AM
> To: Tomcat Users List; Jens Skripczynski
> Subject: RE: [OT] free Database with Transaction (Sorry for the noise)
>
>
> Hypersonic, best thing is that it's written in java, and can be embedded
> into your applications.  Also, you can setup the tables to be in
> memory, or
> on disk...
>
> --mikej
> -=-
> mike jackson
> [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Jens Skripczynski [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 18, 2003 10:20 AM
> > Cc: [EMAIL PROTECTED]
> > Subject: [OT] free Database with Transaction (Sorry for the noise)
> >
> >
> > hi,
> >
> > I'm looking for a Database, that can do
> > - sql transactions,
> >   (or anything similiar to sql - if it works with a xml
> >   database, xml is fine)
> > - has a java 1.4.1 jdbc driver
> > - is free (even better if for commercial use)
> >
> > 'Mysql' was my first option, but it does not have transactions.
> >
> > In an _old_ computer magazine i found 'instantdb' but this one
> > seems to be discontinued.
> >
> > The database tables i want to create, are only for one application.
> > So a client server system or connection pooling are not neccessary.
> >
> > If someone knows what 'instantdb' is, its features seem to be enough.
> > Anything additional is good.
> >
> > But i think the 'free' statement reduces the return results to '0'. :(
> >
> > Ciao
> >
> > Jens Skripczynski
> > --
> > E-Mail: skripi(at)myrealbox(dot)com
> >
> > In this world there are only two tragedies; one is not getting
> > what one wants, the other is getting it.
> >   -- Oscar Wild
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [OT] free Database with Transaction (Sorry for the noise)

2003-02-18 Thread Ryan Chambers

For an industrial strength open-source DB, try
http://postgresql.org



-Original Message-
From: Mike Jackson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 11:14 AM
To: Tomcat Users List; Jens Skripczynski
Subject: RE: [OT] free Database with Transaction (Sorry for the noise)


Hypersonic, best thing is that it's written in java, and can be embedded
into your applications.  Also, you can setup the tables to be in memory, or
on disk...

--mikej
-=-
mike jackson
[EMAIL PROTECTED]

> -Original Message-
> From: Jens Skripczynski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 10:20 AM
> Cc: [EMAIL PROTECTED]
> Subject: [OT] free Database with Transaction (Sorry for the noise)
>
>
> hi,
>
> I'm looking for a Database, that can do
> - sql transactions,
>   (or anything similiar to sql - if it works with a xml
>   database, xml is fine)
> - has a java 1.4.1 jdbc driver
> - is free (even better if for commercial use)
>
> 'Mysql' was my first option, but it does not have transactions.
>
> In an _old_ computer magazine i found 'instantdb' but this one
> seems to be discontinued.
>
> The database tables i want to create, are only for one application.
> So a client server system or connection pooling are not neccessary.
>
> If someone knows what 'instantdb' is, its features seem to be enough.
> Anything additional is good.
>
> But i think the 'free' statement reduces the return results to '0'. :(
>
> Ciao
>
> Jens Skripczynski
> --
> E-Mail: skripi(at)myrealbox(dot)com
>
> In this world there are only two tragedies; one is not getting
> what one wants, the other is getting it.
>   -- Oscar Wild
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tomcat as a production server?

2003-02-18 Thread Ryan Chambers

To force a dump of the call stack, type:
kill -3 

I'm not sure where the output will go for you, it depends on the
configuration of your system. Search for Thread- in your log files.

As for the CPU pinning, I agree with whoever wrote in earlier that it's
probably some bad code that you wrote. Which isn't nice to hear, because
finding the code can be like finding a needle in a haystack. If I was you,
I'd start looking at any connections made from your tomcat server to other
servers, eg. JDBC connections or HTTP posts, maybe even SMTP. If these
connections hang then you might get performance problems.



-Original Message-
From: Ben Ricker [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 7:07 AM
To: Tomcat Users List
Subject: Re: Tomcat as a production server?


You want to put a profiler on that box and see what threads are racing
away. You can also tell the JVM to throw a traceback of all the threads
being used, but I for got how exactly :(

Anyway, look at the code. You definately have something going on there.

Ben Ricker

On Sat, 2003-02-15 at 18:47, Arcadius A. wrote:
> Hello!
> We're using tomcat 4.1.12, Apache 1.3.27 , mod_jk1.2.2 on a redhat 7.3
> server ( AMD Duron 1.2GHz, 256 RAM).
>
> The problem is that the server runs quite fine the first few days but
> after a week, the server is heavily busy: While the number of tomcat
> processes and the memory usage is slightly the same, the CPU usage of each
> of the tomcat processes highly increase (  from 0.0% to about 19% for each
> of the tomcat processes). so tomcat can no longer respond to requests
> from the browser. the only one thing I use to do is restart the
> server then everything works fine again
> Note that all the  6 java processes shown in the attached file are from
> tomcat. And we're using tomcat's default configurations.
>
> Please has anyone coped with this problem before?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Ben Ricker <[EMAIL PROTECTED]>
Wellinx.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Tomcat/Weblogic!!...

2003-01-29 Thread Ryan Chambers

Here is a contrary point of view.

They have nothing close to the same level of functionality. Tomcat is a JSP
and servlet container. Weblogic can do these things, but it is also an EJB
container, RMI server, insert list of features here.

In some cases it makes sense to integrate tomcat with weblogic. It's much
cheaper to cluster tomcat servers than to cluster weblogic servers. The cost
and functionality of weblogic is wasted on doing things like serving JSPs.

I don't have a lot of advice on how to do the integration. So don't ask. :)
WL will take connections from java clients (amongst others), including
tomcat. It shouldn't be that hard to find advice on the internet.

-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 5:47 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat/Weblogic!!...


Weblogic and Tomcat do the same thing! They are both java servlet
containers... It might make sense to integrate Tomcat with Apache or
Weblogic with Tomcat but _not_ weblogic and Tomcat.

-Original Message-
From: Ramkumar Krishnan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 2:29 PM
To: Tomcat Users List
Subject: Tomcat/Weblogic!!...


Hi,
 Is it possible to integrate tomcat (web server) and weblogic (App
server)..if so how it is possible?..


Any help would be appreciated


thanks,
Ramkumar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]