JDeveloper OutOfMemoryError side effects

June 15th, 2011 | Posted by Bogdan Petridean in Oracle ADF | 4 Comments

Last week while trying to install JDeveloper 11g R2 I noticed that one of my partitions – the one where all Oracle software is installed – was full.

So , I started looking for the space leak by checking the size of each dir and found out that Oracle Home directory, where all Middleware Homes reside, was taking a huge amount of space.

Went deeper and ended up in the following location:

Oracle Home/Middleware Home/jdeveloper/jdev/bin/

where I found a large number of files called java_pid<pid>.hprof as in the sample image below:

What’ s the story of these files?

I found the answer in jdev.conf file located in the same directory (Oracle Home/Middleware Home/jdeveloper/jdev/bin/) as the above .hprof files:

When an OutOfMemoryError is encountered the heap is automatically dumped in a file called java_pid<pid>.hprof and stored in the working directory of the VM.
The hprof file can be later analyzed using any tools that can import this format: jhat, NetBeans and YourKit.

The size of java_pid<pid>.hprof files is directly proportional with JDeveloper memory amount. To increase/decrease JDeveloper memory checkout this link.

Is it safe to remove them?

Yes, as long as you are not interested in analyzing them.

How to stop automatic heap dump on OutOfMemoryError?

You can stop hprof files from being automatically created on OutOfMemoryError as follows:

1. Open Oracle Home/Middleware Home/jdeveloper/jdev/bin/jdev.conf

2. Comment the following line:

3. Restart JDeveloper.

Cheers!

4 Responses to “JDeveloper OutOfMemoryError side effects”

  1. John Stegeman says:

    Hi Bogdan,

    Thanks for this – just a note that in JDev 11.2, this was set by default.

    john

  2. Bogdan Petridean says:

    Hi John,

    Thank you for the tip :)
    Is JDeveloper 11.2 available for download or, for now, is just internal?

    Thank you,
    Bogdan.

  3. Krishnaraj says:

    A short cut to find huge files that go unnoticed, especially when there is low disk space; run the disk defragmenter, and it will show the files with maximum fragements and chances are that the huge files will be at the top of the list.

  4. Bogdan Petridean says:

    Thanks for the tip Krishnaraj.

    Cheers,
    Bogdan.

Leave a Reply