0

This question is related to this one:

If I have a heap dump report that a 95% of threads are left in wait or parked state, and that there is arround 750MB free heap memory available how is it possible to get an java.lang.OutOfMemoryError?
Since there seems to be free heap according to the report this seems weird to me!
Can anyone help me interpret this?

9
  • 3
    Show the whole error message... Commented Jul 27, 2012 at 8:04
  • @beny23:Everything is in the post I link to Commented Jul 27, 2012 at 8:07
  • 1
    possible duplicate of How to detect the cause of OutofMemoryError? Commented Jul 27, 2012 at 8:18
  • @beny23:But it is not the same question.Why is it a duplicate? Commented Jul 27, 2012 at 8:21
  • you said that "everything is in the post that you linked to", so it would be easier to edit the original question. In any case, I think that existing 695 threads is the likely reason it fails, because it just can't create any more. Commented Jul 27, 2012 at 8:25

2 Answers 2

1

What kind of OS are you using? Is it 32 Bit oder 64 Bit? Is your JDK 32 Bit oder 64 Bit? How much heap space do you need in total? Try to run your program with more maximum heap space. I had the same problem while I wanted to transform a XML-file. You just to set following parameters:

In your shell:

java -Xmx1024m -jar yourfile.jar
Sign up to request clarification or add additional context in comments.

1 Comment

could you just accept the working answer? did anything work for you?
1

OOME can be raised by Heap overflow or Stack overflow. So if you can sure heap is enough, I recommend to check stack size.

3 Comments

I think you mean a lack of stack space, a stack overflow is caused by too many levels of recursion.
If the stack space is too small won't I get a StackOverflow error instead of an OutofMemoryError? caucho.com/resin-3.0/performance/jvm-tuning.xtp
As below link, OutOfMemoryError can be raised by stack size issue. kr.forums.oracle.com/forums/thread.jspa?threadID=605890

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.