3) Can someone point me at some good doc for learning about memory profiling of Java app's. Specifically over a long period of time. Even to figure out how much ram each session is taking and when that is being garbage collected as per Tom's example below.

I've used OptimizeIt (http://www.borland.com/us/products/optimizeit/index.html), although not in its most recent incarnation, of which there have been several. I have also heard that JProbe (http://www.quest.com/jprobe) has seen plenty of use with WebObjects, although that might be a few incarnations ago as well. I am aware of JProfiler (http://www.ej-technologies.com/products/jprofiler/overview.html) although I haven't heard of it being used with WebObjects.

The first two work by connecting to the VM's JVMPI (Java Virtual Machine Profiler Interface) ports. This slows the VM down a good deal. You wouldn't want to hook up to this in production and leave the profiler running for days until trouble appeared.

Some ideas:

- Check that sessions are indeed terminating.

- I have no idea how much traffic you are seeing or what percentage of overall memory is leaking. However, you might determine how much memory per session is leaking -- that in itself might give you a clue as to the problem, especially if it's a lot.

- Set up the app in development with a profiler attached. Set the session timeout to be short. Watch what happens, even with a nominal amount of activity on the session, especially as the session terminates. Also visit any suspicious areas of the application. Be aware that the garbage collector collects in its own sweet time, as I mentioned earlier. The problem is difficult in principal but, especially if the leak is large, it may be pretty easy to spot.

I'd also give some consideration to periodically restarting instances. Not as a solution to a real memory problem but as insurance against your mission-critical application failing early Sunday AM.

        Tom

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to