Re: Would like to monitor memory use offline

2008-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: | Everything is local except the pooled connections, so I would say this | is the problem. This code was originally written before tomcat had good | connection pools, and so I had to write my own. The pool is

Re: Would like to monitor memory use offline

2008-08-12 Thread Richard S. Huntrods
Richard, Richard S. Huntrods wrote: | Everything is local except the pooled connections, so I would say this | is the problem. This code was originally written before tomcat had good | connection pools, and so I had to write my own. The pool is basically a | vector of connections. I wouldn't

Re: Would like to monitor memory use offline

2008-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: | I use a RSMD object in all my queries. I don't close | it. - MAYBE THAT's THE PROBLEM. I will test and report... Looking back at the JDBC API, I'm not sure you have any control over the RSMD query, result, etc.

Re: Would like to monitor memory use offline

2008-08-12 Thread Richard S. Huntrods
Chris, | If I close the resultset AND the statement, then the connector | should release all the objects created by those two. The connection is, | after all, just a pipe between the database and the java code. The | connector should not (IMO) be hanging on to statement or resultset | objects

Re: Would like to monitor memory use offline

2008-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: | I FIXED THE PROBLEM! | | Yep - totally fixed (tested and verified). | | What I decided to do was to move the close statements (and nulling RSMD) | into the FINALLY block - it seemed pointless to duplicate

Re: Would like to monitor memory use offline

2008-08-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: | Richard, | | Richard S. Huntrods wrote: | |public static Vector listLookup(String table) { | | //Connection connection = null; // connection is managed by a | | connection pool | | So, is

Re: Would like to monitor memory use offline

2008-08-11 Thread Richard S. Huntrods
Richard, Richard S. Huntrods wrote: | Richard, | | Richard S. Huntrods wrote: | |public static Vector listLookup(String table) { | | //Connection connection = null; // connection is managed by a | | connection pool | | So, is 'connection' a local or not? | It's part of my code (I

Re: Would like to monitor memory use offline

2008-08-08 Thread Richard S. Huntrods
Chris, Richard, Richard S. Huntrods wrote: | In my code I was calling resultSet.close(), but not statement.close(). That'll do it. Actually, fixing it did NOT help. See more below... | The problem is, even though I verified (debug statements) that the call | is being made, the memory is

Re: Would like to monitor memory use offline

2008-08-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: |public static Vector listLookup(String table) { | //Connection connection = null; // connection is managed by a | connection pool So, is 'connection' a local or not? |Statement statement =

Re: Would like to monitor memory use offline

2008-08-07 Thread Philip Wigg
Hi, the manager application can return values in XML. You just need to hit:- http://localhost:8080/manager/status?XML=true or wherever it's located. This makes it a bit easier to write shell scripts based on Free Heap or Max Threads or whatever. I've got a perl script which checks whatever

Re: Would like to monitor memory use offline

2008-08-07 Thread Richard S. Huntrods
Well, thanks to Lamda probe and then to jmap, I have found my memory leak. Here are the gory details in case anyone is interested. It's not really a Tomcat issue, but rather the boundary between Tomcat and MySQL: I have a memory leak in my application, and jmap shows me that all my objects of

Re: Would like to monitor memory use offline

2008-08-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard, Richard S. Huntrods wrote: | In my code I was calling resultSet.close(), but not statement.close(). That'll do it. | The problem is, even though I verified (debug statements) that the call | is being made, the memory is STILL not being

Re: Would like to monitor memory use offline

2008-08-06 Thread Richard S. Huntrods
To Ben Mark, Thanks for the replies. I've been trying various things based on your suggestions. I find my best tool at the moment is Lambda Probe - though it hasn't been updated in a while, it does show me all the things (for the most part) that I wanted to watch. There's definitely some

Re: Would like to monitor memory use offline

2008-08-03 Thread Mark Thomas
Richard S. Huntrods wrote: SO - my question - is there a relatively easy way to create something (say a servlet) to watch the stack *just like I can do manually using the manager application* but email me when the stack approaches the memory limits? Richard, Tomcat is open source so if you

Re: Would like to monitor memory use offline

2008-08-03 Thread Ben Stringer
On Sat, 2008-08-02 at 19:18 -0700, Richard S. Huntrods wrote: SO - my question - is there a relatively easy way to create something (say a servlet) to watch the stack *just like I can do manually using the manager application* but email me when the stack approaches the memory limits? Hi

Re: Would like to monitor memory use offline

2008-08-03 Thread Sameer Acharya
You can write a simple JSP which will run a freeMemory/totalMemory call in your JVM and possibly send a mail/log when the limits are reached. You could set a refresh interval and have this page refresh say every 5 minutes in your browser. Alternatively you can tweak with the manager app code.