tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: AW: AJP suddenly Stopps acting: ajp on 7009 and 9009 : connections keept open
Date Wed, 13 Mar 2013 11:19:36 GMT
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message