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

We are using Fedora-8 64 bit in Amazon EC2 and our Java application is running on the IBM JRE. Now we are getting a Java hang "out of memory" error. Our memory is 7.6 GB and we have allotted heap memory -Xms3000M -Xmx3000M. We are still getting the same problem. The question is, if I increase the heap size then will this problem be rectified? Or is there any other alternative to solve this problem?

share|improve this question

3G is sound like large enough amount of memory assigned to java heap, you may get not heap out of memory but permanent generation (PermGen). Consider increase PermSize and MaxPermSize.

To solve problem you may need monitor how fast and which part of JVM memory is growing. Use JMX console, also you may look deeper - take snapshot of running java heap and analyse it to define problematic places ( also thread dump and object histogram may help.

share|improve this answer
I agree. Increase MaxPermSize to maybe 256M. – djangofan May 3 '11 at 19:15

Fedora-8 is a four year old release. You should seriously considering upgrading your environment to the latest stable release of your distro and the EC2 kernels before trying to track down any mis-behaving software memory issues.

share|improve this answer
Yeah, on EC2, with a Java service running, I would recommend using either the default Amazon Linux distros (similar to Redhat) or the SUSE 9 that is available. – djangofan May 4 '11 at 23:48

You shouldn't be using a "JRE" version of Java. You should be using a version of Java that supports the -server VM. It could be that since your running a Java that is a JRE, that it has limits on JVM size since its defaulting to a non-server VM. Its easy to investigate this: just looking in your JRE directory for the "server" directory to see if you have it. I don't know anything about the IBM JRE though, and so your milage may vary on my advice.

I would recommend trying the latest version of the Oracle JDK instead since I am 100% sure it has a -server implementation in it. Or, maybe a JDK version of the IBM vm, if you can get it.

I say all these things because your question states that your explicitly using a JRE.

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.