> From: dharshana vanderbona [mailto:[EMAIL PROTECTED]
> Subject: Fwd: garbage collection problem with class
> sun.reflect.GeneratedMethodAccessor
>
> After running the system for sometime with around 50 users I noticed
> that the system is starting to fillup the memory.
Hi All,
I'm working on a web application which uses Struts & JSPs.
Platform : Linux
Servlet Engine : Tomcat 5.5
Java version: Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed
mode, sharing)
with the following settings.
JAVA_OPTS="-Xms512m -Xmx512m"
JAVA_OPTS="$JAVA_OPTS -verbose:gc -XX:+Prin
" its webapps
currently are.
Durfee, Bernard wrote:
I'd rather have a major garbage collection kick off with no users logged
in vs. 100 users logged in. My application pulls data from a database
and generates charts on the fly. Both of those operations require object
creation. So my heap u
If you know that no or only few users are currently logged in, you can
trigger System.gc() yourself.
I think Tomcat has no reliable way to know how "busy" its webapps
currently are.
Durfee, Bernard wrote:
I'd rather have a major garbage collection kick off with no users logged
i
I'd rather have a major garbage collection kick off with no users logged
in vs. 100 users logged in. My application pulls data from a database
and generates charts on the fly. Both of those operations require object
creation. So my heap usage grows over time. My usage trends tend to be
bu
Calling System.gc() is considered to be a bad thing since this would
trigger a "major" garbage collection which would take relatively long,
compared with a minor collection.
Besides this: Tomcat knows that it has nothing to do in right this
moment. But does that mean that is always a
: Garbage Collection
Right, my question was whether or not Tomcat would call System.gc() to
'suggest' to the JVM that garbage collection take place. Tomcat itself is the
best authority as to how busy it is. Since Tomcat has been around for a long
time I figured that this might have been i
Right, my question was whether or not Tomcat would call System.gc() to
'suggest' to the JVM that garbage collection take place. Tomcat itself
is the best authority as to how busy it is. Since Tomcat has been around
for a long time I figured that this might have been implemented at
Hi There,
Tomcat does not control the garbage collection, it is up to the JVM to
decide if and when a garbage collection is performed. The only way you can
request a garbage collection is by using the System.gc() method, which the
JVM can ignore.
For more information on this Topic read
How is garbage collection controlled in Tomcat 5.5? I ran a bit of an
experiment by profiling Tomcat 5.5.7 while running a web application. I
ran a load test against the application that finished with the allocated
object size just below the heap size. If it grew any more, garbage
collection would
Hi,
>The memory sizes are
>checked every day with the "ps -o time,etime,pcpu,pmem,vsize,rssize"
>command.
This is a sub-optimal method for tracking memory usage for a JVM. The
reason is that what you're tracking with the above command is the
OS-level memory usage, which includes a lot of stuff
1. No there is no Garbage Collection configuration in tomcat. This is controlled by
the JVM.
2. This is not possible. Garbage collection is kicked off when a pool in the JVM fills
up and clears up all expired objects. For there to be a memory leak then there must be
something keeping a handle
vsize,rssize"
command.
The third party suggests that the problems could be due to garbage
collection configuration in tomcat and would like us first to consult with
'tomcat experts'.
If you have expertise with tomcat and are reading this could you please
confirm for us:
1.
I'd use Windows 2003 (or .NET Server if you like) and there is no
Garbage Collection to the application. About internal kernel management
I don't know, but applications can't use it. Applications have to use
there own algorithms. It would simply be impossible to redesign this f
memory.)
I was thinking its a windows 2003 garbage collection issue as they seem to
have changed their memory handing concept and now use the garbage collection
concept. In windows 2000, it was different. And when we were running our
webapps on windows 2000, it was fine. Unfortunately we recently
S? How
are you starting tomcat - as service or as application?
> Could this be a issue with the Windows server 2003 garbage collection as I
read it is written using C#? anyone has any idea if this is the problem?
No.
Windows 2003 server has nothing to do with applications garbage collection.
increasing the memory allocated from the Windows Server 2003
O/S.
Could this be a issue with the Windows server 2003 garbage collection as I read it is
written using C#? anyone has any idea if this is the problem?
Any help would be very much appreciated.
Thanks
Travis
Typically a JVM doesn't release memory to the OS.
Removeing references to the objects should be enough. (Via explicit setting
to null, or letter a variable fall out of scope from its block)
-Tim
Emre wrote:
Where and when does garbage collection happen in the JSP pages.
In my jsp pages
Where and when does garbage collection happen in the JSP pages.
In my jsp pages I use beans as well as importing some of my own java
objects. What I am wondering is if I have to explicitly get rid of these
objects. Because the memory usage never seems to go down during off peak
hours.
Any
On Wed, Apr 14, 2004 at 09:46:12PM +0100, Tiago Matias wrote:
: As a side question, if the singleton life cycle can not be easily
: controlled or known, what is the best way to perform an one-time
: expensive initialization?
If it's just general init activity (say, loading a config file),
do a w
Hey
I know that this is an old and a quite recurring issue here, but after
spending some time going through the archives and googling around I'm
still a bit confused.
The problem is relatively simple. I have a singleton class which takes a
lot of time to initialize and I need to understand if
m: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 1:08 PM
To: Tomcat Users List
Subject: Re: Garbage Collection
your heap size remains stable according to the verbose GC. That in itself
doesn't tell you if there is a problem or not. Is there some slowness in
your jsp?
you
have used JProfiler to try and find memory issues but the odd thing is we
have never been able to duplicate this problem in our testing environment
only in production.
-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 1:08 PM
To: Tomcat Users List
S
Peter Lin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 1:08 PM
To: Tomcat Users List
Subject: Re: Garbage Collection
your heap size remains stable according to the verbose GC. That in itself
doesn't tell you if there is a problem or not. Is there some slowness in
your jsp?
you mi
your heap size remains stable according to the verbose GC. That in itself doesn't tell
you if there is a problem or not. Is there some slowness in your jsp?
you might want to d/l borland optimizeIt trial version and get a better picture of
what is happening.
peter
Rob Wichterman <[EMAIL PRO
Can anybody tell me if these look like healthy garbage collections.
[GC [ParNew: 3968K->0K(4032K), 0.0132890 secs] 25349K->22156K(56072K),
0.0134572 secs]
[GC [ParNew: 3952K->0K(4032K), 0.0086222 secs] 26109K->22649K(56072K),
0.0087891 secs]
[GC [ParNew: 3953K->0K(4032K), 0.0092634 secs] 26
Neal,
When I said that "surely it can't be a memory leak in my app" I was
operating under the assumption that the JRE runs garbage collection
periodically anywayis this not true?
The GC is pretty much free to run whenever it wants. Often, it will not
run until you get very c
When I said that "surely it can't be a memory leak in my app" I was operating under
the assumption that the JRE runs garbage collection periodically anywayis this not
true?
If I was waisting resources and not releasing them in a way that the GC could take
them ba
pira
Millennium ChemInformatics
>-Original Message-
>From: Neal [mailto:[EMAIL PROTECTED]
>Sent: Sunday, November 30, 2003 8:21 PM
>To: 'Tomcat Users List'
>Subject: Garbage Collection issues
>
>My Tomcat 4.1 (hosted on Linux) seems to have a problem in recent
mon
uot;Tomcat Users List"
Til:"'Tomcat Users List'" <[EMAIL PROTECTED]>
cc:
Vedr.: Garbage Collection issues
My Tomcat 4.1 (hosted on Linux) seems to have a problem in recent months
with crashing due to unavailable free RAM. Specifically I g
run garbage collection however my RAM totally
frees up and all is well (Runtime.getRuntime().gc();).
Why would this happen? Surely this isn't due to a programming error on
my part, otherwise, the resources should automatically released whenever
the JRE performs periodic garbage collection.
y problems, it's probably
something else.
Hope this was helpful,
Regards,
Will Hartung
([EMAIL PROTECTED])
- Original Message -
From: "Turoff, Steve" <[EMAIL PROTECTED]>
To: "Will Hartung" <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 10:07 AM
Su
Howdy,
>Is there any difference between -Xms64m and -Xms64M
>Similarly is there a difference between -Xms1G and -Xms1g
Why don't you try them both? ;) If a -X setting is incorrect or
unacceptable, the JVM won't start. It'll quit with an unrecognized
parameter error message. If both -Xms64m an
I know somebody answered this question before but could not find it in
the archives.
Is there any difference between -Xms64m and -Xms64M
Similarly is there a difference between -Xms1G and -Xms1g
Hari
It's not tomcat that runs the gc but the jvm.
To find out more about when the garbage collection happens,
you have to set the verbosegc option of the vm:
http://docs.sun.com/db/doc/806-1367/6jalj6mv7?a=view
http://www-106.ibm.com/developerworks/java/library/i-garbage3/
To tune the gc yo
Is there a way to find out how often tomcat runs Garbage Collection and
how to optimize it if GC does not happen often
Hari
From: Will Hartung [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 4:54 PM
> To: Tomcat Users List
> Subject: Re: Memory Usage and Garbage Collection
>
>
> > From: "Brandon Cruz" <[EMAIL PROTECTED]>
> > Sent: Friday, January 03, 2003 2:
So the instance, and it's string, can still be GC'd, right?
Nope.
There is still a live reference to each OtherObject instance sitting in
the static HashMap "cache". Therefore, this instance cannot be GC'd, even
though *you* have released your own reference to it. And, if the
OtherObject class
[EMAIL PROTECTED]
> Subject: RE: Memory Usage and Garbage Collection
>
> Just wanted to know, does the current implementation of tomcat
4.1.18
> also has the same problem of keeping the jsp's
> in memory. or it was only present in 4.0.4
>
It's not a *problem* -- it
> There is still a live reference to each OtherObject instance sitting in
> the static HashMap "cache".
> there is no way to ***ever*** GC this instance
Another example of a similar memory leak is the File.deleteOnExit method.
It should not be used without extreme care and understanding in a serv
> Instead, you'd want to use a single JSP page for each basic *style*
> of output (essentially the JSP page would be a formatting template)
> that pulls in the unique information for a particular report (from
> the database, from XML, or whatever) dynamically.
For example, with the web site for Th
Cruz wrote:
Date: Fri, 3 Jan 2003 16:23:24 -0600
From: Brandon Cruz <[EMAIL PROTECTED]>
Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: RE: Memory Usage and Garbage Collection
Craig,
From what you ha
On Fri, 3 Jan 2003, Brandon Cruz wrote:
> Date: Fri, 3 Jan 2003 16:23:24 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE:
> From: "Brandon Cruz" <[EMAIL PROTECTED]>
> Sent: Friday, January 03, 2003 2:23 PM
> Subject: RE: Memory Usage and Garbage Collection
> 1)For every single request to a servlet or JSP page, a new instance of
that
> class is created? For example, if there is one J
nstances created will take up all the available RAM. Is
this correct?
Brandon
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 1:43 PM
To: Tomcat Users List
Subject: RE: Memory Usage and Garbage Collection
On Fri, 3 Jan 2003,
Hi Craig,
thank you very much for this complete explanation. That's
perfectly understandable and the GC-behaviour which I had
expected before. I must have understood something wrong in this
thread's discussion, which went on yesterday.
Again, thank you very much for your helpful responses (not
On Fri, 3 Jan 2003, Saurabh Arora wrote:
> Date: Fri, 03 Jan 2003 02:33:17 -0700
> From: Saurabh Arora <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RE: Memory Usage and Garbage Collection
>
> Just
On Fri, 3 Jan 2003, Andreas Probst wrote:
> Hi Craig,
>
> please see intermixed.
>
> On 2 Jan 2003 at 18:18, Craig R. McClanahan wrote:
>
> >
> > Instances can be garbage collected IF AND ONLY IF there are no
> > live references to that object in a static/instance/local
> > variable of some othe
Hi thank you,
your reply calms me down again. I guess I got a bit confused by
the preceding discussion.
Andreas
On 3 Jan 2003 at 8:59, Shapira, Yoav wrote:
> Hi,
> There's clearly some misconceptions on the topic of garbage
> collection ;) These questions come up very ofte
Hi,
There's clearly some misconceptions on the topic of garbage collection
;) These questions come up very often it seems, on this list and
others.
>Please consider the following service() or doGet() or so of a
>servlet:
>
>public void service(ServletRequest request, ServletR
Just wanted to know, does the current implementation of tomcat 4.1.18
also has the same problem of keeping the jsp's
in memory. or it was only present in 4.0.4
saurabh
>>> [EMAIL PROTECTED] 01/03/03 02:26PM >>>
Hi Craig,
please see intermixed.
On 2 Jan 2003 at 18:18, Craig R. McClanahan wrot
Hi Craig,
please see intermixed.
On 2 Jan 2003 at 18:18, Craig R. McClanahan wrote:
>
> Instances can be garbage collected IF AND ONLY IF there are no
> live references to that object in a static/instance/local
> variable of some other object that is also in memory. Only
> instances that are n
On Fri, 3 Jan 2003, Julian Löffelhardt wrote:
> Date: Fri, 3 Jan 2003 02:01:58 +0100
> From: Julian Löffelhardt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Memory Usage and Garb
On Thu, 2 Jan 2003, Brandon Cruz wrote:
> Date: Thu, 2 Jan 2003 19:04:55 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: Memory Usage and Garbage Collection
>
> Craig,
>
> T
t" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 1:12 AM
Subject: Re: Memory Usage and Garbage Collection
>
>
> On Thu, 2 Jan 2003, Brandon Cruz wrote:
>
> > Date: Thu, 2 Jan 2003 16:16:23 -0600
> > From: Brandon Cruz <[EMAIL PROTE
mcat Users List; [EMAIL PROTECTED]
Subject: Re: Memory Usage and Garbage Collection
On Thu, 2 Jan 2003, Brandon Cruz wrote:
> Date: Thu, 2 Jan 2003 16:16:23 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> [EMAIL
On Thu, 2 Jan 2003, Brandon Cruz wrote:
> Date: Thu, 2 Jan 2003 16:16:23 -0600
> From: Brandon Cruz <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Memory
Do loaded jsp pages and/or class files ever get garbage collected when
tomcat is running?
We have a production server with several hundred virtual hosts per host,
each with a fair share of jsp pages and with moderate to low traffic per
host. As time goes on, the amount of memory being used consta
I am using tomcat 4.1.12 with JDK 1.4.1.
I have JSP that starts a thread under tomcat. This thread seems to work
fine, but some objects ( which has valid reference ) are getting garbage
collected. I find that the finalizer thread runs through the shutdown of
this object.
But when I run it in comma
On Thu, 29 Aug 2002, Michael Nicholson wrote:
> Date: Thu, 29 Aug 2002 09:07:58 -0400
> From: Michael Nicholson <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: OT: Garbage Collection
ct: RE: Garbage Collection in Java: Am I an idiot?
>
>
> Howdy,
> Very few things are guaranteed regarding garbage collection
> when you consider your system as a whole. The container can
> almost always cache things like JSPs, servlets, and sessions
> until it feels
Howdy,
Very few things are guaranteed regarding garbage collection when you
consider your system as a whole. The container can almost always cache
things like JSPs, servlets, and sessions until it feels like releasing
them. Some of these parameters you can control via configuration, e.g
o debug this memory issue), so maybe these open connections force
some of the session scoped beans to persist? Forever? Or am I just missing something
completely about garbage collection?
So, in short, if I have a session scoped bean that has in it something like a
connection or a recordset (w
> > Each time I reload my application with the Manager servlet the
> > memory usage
> > increase.
> >
> > Spec: I have Tomcat 4.0.2 and JDK 1.3.1_02 running on a Windows2k
machine.
> >
> > I have located my problem using JProbe with Tomcat 4.0.2. Looking at the
> > instance summary before and afte
Hi,
> -Original Message-
> From: Thomas ?hlen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 15, 2002 4:11 PM
> To: Tomcat Users List
> Subject: Problems with Manager reload, memory usage and garbage
> collection.
>
>
> Each time I reload my applicati
essage-
> From: Thomas Ehlen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 15, 2002 9:11 AM
> To: Tomcat Users List
> Subject: Problems with Manager reload, memory usage and garbage
> collection.
>
>
> Each time I reload my application with the Manager servlet
&
Each time I reload my application with the Manager servlet the memory usage
increase.
Spec: I have Tomcat 4.0.2 and JDK 1.3.1_02 running on a Windows2k machine.
I have located my problem using JProbe with Tomcat 4.0.2. Looking at the
instance summary before and after a reload I see that there is
See below:
> -Ursprüngliche Nachricht-
> Von: Bang, Steinar [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 25. Oktober 2001 09:20
> An: '[EMAIL PROTECTED]'
> Betreff: RE: Questions on tomcat heap usage and garbage collection
> (avoidi ng O utOfMemoryErr
See intermixed.
On Thu, 25 Oct 2001, Bang, Steinar wrote:
> Date: Thu, 25 Oct 2001 15:55:35 +0200
> From: "Bang, Steinar" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Questi
I wrote earlier:
> Craig R. McClanahan [mailto:[EMAIL PROTECTED]] writes:
[snip!]
> But it doesn't address my real worry at the moment:
> that a script kiddie armed with nothing more than
> the httperf testing tool can bring my tomcat to
> crash.
>> and/or whether your test JSP page can tempor
Craig R. McClanahan [mailto:[EMAIL PROTECTED]] writes:
> The most important task in a situation like this is
> to find out why memory is being consumed in the first
> place. Generally, this is caused by one of the
> following types of factors:
> * Creating lots and lots of session attributes in
Randy Layman [mailto:[EMAIL PROTECTED]] writes:
> I think the best thing you can do is to determine
> where the memory is going and fix your leaks. I say
> your leaks because in my experience, Tomcat doesn't
> leak memory and doesn't take a lot of memory for each
> connection.
I perhaps wasn't
Bang, Steinar at [EMAIL PROTECTED] wrote:
> Which brings us to question 2: tuning apache/tomcat:
> When reading the documentation, I thought that there
> was supposed to be a single tomcat process, serving
> all requests. However top reports a lot of tomcat
> processes, when I'm stresstesting th
0
> From: "Bang, Steinar" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Questions on tomcat heap usage and garbage collection (avoiding
> O utOfMemoryError exceptions)
>
>
gt; An: '[EMAIL PROTECTED]'
> Betreff: Questions on tomcat heap usage and garbage
> collection (avoiding
> OutOfMemoryError exceptions)
>
>
> Platform: Intel PIII 797.499MHz, 256MB RAM
> Debian Woody GNU/Linux,
> kernel 2.2
m: Bang, Steinar [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 3:21 AM
> To: '[EMAIL PROTECTED]'
> Subject: Questions on tomcat heap usage and garbage
> collection (avoiding
> O utOfMemoryError exceptions)
>
>
> Platform: Intel PIII 797.499MHz
p size aren't reached before the tomcat
processes are restarted?
3. catch the exception?
4. use some kind of watchdog to restart tomcat?
Question 3 raises more questions:
3a. What do you do when you catch the exception?
There isn't much you _can_ do if you don't have
any
77 matches
Mail list logo