Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a memory leak with Glassfish 3.0.1 and Windows Server 2008 R2 Enterprise (64bit machine), with or without any running applications

Is there a way to resolve this?

The same Glassfish 3.0.1 work fine on linux and Windows XP SP2 without any leaks.

I can see the leak through the Windows Task Manager. I am using Java SE 6 update 22


share|improve this question

The best way to identify memory leaks in Java is to start up the server and let it get warmed up to a normal operating level and then take heap dumps over time. If you are using the Sun JDK you can trigger a heap dump like this:

jmap -dump:file=normal.hprof <pid of java process>

Let the server run for a while and when you see the memory start to climb take another heap dump.

Repeat this process as the heap grows until you are satisfied that you have a good set of data.

You can use jhat to analyze the heap dumps to see what types of objects are filling the heap. The culprit(s) will be increasing over time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.