David Kumar wrote:
Hey,
we just had that problem again. I did that GC trick, it didn't work out well.
I used:
set hosts [list]
lappend hosts {localhost:7008}
lappend hosts {localhost:9008}
# ...add as many as you want...
foreach {host} $hosts {
set parts [split $host ":"]
set hostname [lindex $parts 0]
set port [lindex $parts 1]
# for each host...
# Connect to it.
jmx_connect -h $hostname -p $port
# Invoke the garbage collector.
jmx_invoke -n -m java.lang:type=Memory gc
# Close this connection
jmx_close
}
I found that while googleing.
But it doesn't have any effect. Any other ideas?
Did it really connect with the Tomcat JVM and really do anything ?
Is your JVM started with options that allow JMX interaction ?
Also, there are ways to start the JVM with parameters telling it to log the Garbage
Collections to a logfile. Make sure that you do that, and check the logfile to see if it
really does a GC when you ask it to.
Note that there are also other ways to trogger a GC than using jmxsh. I was only pointing
you to that tool as an easy-to-script, non-GUI tool.
But in your java directory (at least the JDK/bin), there should also be a "jconsole"
program which allows you to do pretty much the same interactively with a GUI.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org