Troubleshooting Memory Leaks in Java

Categories: Java, HTML/ColdFusion

I've been monitoring a server that was recently upgraded to ColdFusion 8. The application was previously running on ColdFusion MX 7—which used Java SDK v1.4. As many of you know, CF8 now runs on Java SDK v1.6.

I've noticed a significant difference in memory management between the two versions of ColdFusion. I've been closely monitoring the server because of the jump in Heap usage I've seen after upgrading.

In my process of researching Memory Management in Java, I came across this an excellent article title Brain Drain In Your Java Apps?* that appears Software Test & Performance magazine. This article appears in the April 2007 Volume 4, Number 4 issue.

There is also a follow article that appears in the May 2007 issue titled It's Not Just The Younger Generations*.

This article is a good resource for anyone trying to figure out how to debug those "Out of Memory" errors. Fortunately, I think my issue is only related to Garbage Collection in the Tenured Generation.

NOTE:
The link to the articles points to PDFs containing the entire magazines. I could not find an HTML versions of them. The article Brain Drain In Your Java Apps? is on page 22 of the April 2007 issue and the article It's Not Just The Younger Generations is on page 26 of the May 2007 issue.

Related Blog Entries

Comments

Adrian J. Moreno's Gravatar Sean has posted about issues with CF 8 and Java 1.6:

http://corfield.org/blog/index.cfm/do/blog.entry/e...

Mark Mandel has more:

http://www.compoundtheory.com/?action=displayPost&...

Hope these can shed some light on your problem.
Dan G. Switzer, II's Gravatar @Adrian:

Thanks for the links. I had already read both those articles back when they posted. The problem they explain is really related to compilation of the CF to Java byte code.

The startup time of the application is fine.

I'm actually not even convinced that it's a "problem". It could just be the difference in the HotSpot technology. Once load on the server goes away, the tenured gen shrinks. This indicates to me that it's probably not a leak, but something is causing it to hold on to memory.
Mark Mandel's Gravatar Dan,

I would seriously consider testing your site on Java5, we have found there to be improvements to memory management as well, and general robustness of the CF Application server.
Mark Mandel's Gravatar I have no idea why I wrote my name as 'Dan' above :P

9am must be too early to be posting comments ;o)
Dan G. Switzer, II's Gravatar @Mark:

I fixed your name in that entry!
Dan G. Switzer, II's Gravatar I posted an update to my problem:
http://blog.pengoworks.com/index.cfm/2007/12/13/Up...

It looks like it was an old version of a JDBC Wrapper I was using to monitor SQL activity that was causing the problem.

Add Comment

Leave this field empty


If you subscribe, any new posts to this thread will be sent to your email address.