Out of Memory error starting JBoss with Portal from Eclipse
Asked Answered
R

5

3

I cannot get JBoss Portal to start from Eclipse, though the AS alone starts fine, and the Portal starts correctly as well, when started from the command line as opposed to from within Eclipse. I'm running in Windows, with 3GB. Suggestions? Thank you.

Revealment answered 18/5, 2009 at 23:22 Comment(0)
S
8

I've spend hours to discover this, and almost gave up and started to use JBoss out of Eclipse.

In order to increase your JBoss vmargs when starting it from Eclipse you have to change JBoss launch configuration. If you change standalone.conf, nothing happens because Eclipse doesn't use it.

So, to change JBoss vmargs in Eclipse, you have to go to "Servers" tab, right click on your Jboss instance, and select "Open".

It will appear a new window. In the first section, you have a option: "Open launch configuration". When you click there, you'll see the textbox to change vmargs.

Hope this helps you!

Seville answered 23/1, 2013 at 13:45 Comment(2)
You sir, deserve a medal!Mathia
Thanks Alex! I'm just giving back to community some knowledge. However, I've still a big debit to community.Seville
P
7

There are different types of OutOfMemory errors:

java.lang.OutOfMemoryError: Java heap space

Increase the -Xms and -Xmx. I'd make sure they are set at least 256m and generally it's a good idea to set them to the same value.

java.lang.OutOfMemoryError: PermGen space

Add either -XX:+CMSPermGenSweepingEnabled or increase the PermGen size: -XX:PermSize=256m

java.lang.OutOfMemoryError: GC overhead limit exceeded

Add more heap, the garbage collector can't free enough memory with each cycle. Also try turning on GC logging.

java.lang.OutOfMemoryError: unable to create new native thread

Decrease your heap :) This means that you have too much memory allocated to the heap that the OS doesn't have enough memory to create threads..


Two last things, the above can be configured in jboss/bin/run.conf.

Also when starting JBoss see what -X parameters are being passed to the JVM, it prints this information by default, verify that it's what you expect it to be.

Postprandial answered 19/5, 2009 at 20:51 Comment(1)
This explanation is vague. Does not give direction how to solve the particular problem. See @user2004087 reply below.Parrakeet
D
0

You need to increase the memory you're allocating to Java, in particular heap space and PermGen. This article is highly relevant. It mentions that this issue often occurs with Eclipse and JBoss (since both are fairly large), and provides a solution (adjusting the command-line flags).

Descendible answered 18/5, 2009 at 23:28 Comment(0)
G
0

What are you using for running portal from eclipse? Maybe Jboss tools can help you http://www.jboss.org/tools

Gnarl answered 15/10, 2009 at 14:4 Comment(0)
S
0
  1. According to my experiments, all options of vmargs set in eclipse.ini, plays only once - when creating a new workspace. When you want to change the options in the existing workspace, use run/debug configuration as in https://mcmap.net/q/424247/-java-lang-outofmemoryerror-permgen-space-closed. vmargs in ini won't be read any more.

  2. Be careful, you should set -XX:MaxPermSize=...M, not -XX:PermSize=..., the last sets minimal, starting PermSize.

  3. ad. Jeremy. It is senseless to put mins and maxs to the same value. You deprive Eclipse of adaptability. -Xms and -Xmx ( heap) and PermGen and MaxPermGen should be different. (MaxPermGen =256 by default)

Subtile answered 30/5, 2012 at 12:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.