A memory error starting with JBoss from a portal from Eclipse

I cannot get JBoss Portal to start with Eclipse, although AS itself starts working fine, and Portal starts correctly when it is launched from the command line and not from Eclipse. I work on Windows with 3 GB. Suggestions? Thanks.

+3
source share
5 answers

I spent hours to discover this, and almost gave up and started using JBoss from Eclipse.

To increase your JBoss vmargs when starting from Eclipse, you need to change the JBoss launch configuration. If you change standalone.conf nothing happens because Eclipse does not use it.

So, to change the JBoss vmargs in Eclipse, you need to go to the β€œServers” tab, right-click on the Jboss instance and select β€œOpen”.

A new window will appear. In the first section, you have the option: "Open launch configuration." When you click there, you will see a text box for modifying vmargs.

Hope this helps you!

+8
source

There are various types of OutOfMemory errors:

java.lang.OutOfMemoryError: Java heap space

Increase -Xms and -Xmx. I would make sure that they are set to at least 256 m, and it is usually a good idea to set them to the same value.

java.lang.OutOfMemoryError: PermGen space

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

java.lang.OutOfMemoryError: GC upper limit exceeded

Add more heaps; the garbage collector cannot free up enough memory with each loop. Also try turning on the GC log.

java.lang.OutOfMemoryError: cannot create new native thread

Reduce your heap :) This means that you have too much memory allocated for the heap, that the OS does not have enough memory to create threads.


In the last two cases, the above can be configured in the jboss / bin / run.conf file.

Also, when JBoss shows which -X options are passed to the JVM, it prints this information by default, make sure that this is what you expect from it.

+7
source

You need to increase the memory that you allocate in Java, in particular, in a lot of space and PermGen. This article is of great importance. It mentions that this problem often occurs with Eclipse and JBoss (since they are quite large), and provides a solution (adjusting command line flags).

0
source

What do you use to start the portal from eclipse? Maybe Jboss tools can help you http://www.jboss.org/tools

0
source
  • According to my experiments, all the vmargs options installed in eclipse.ini are played only once - when creating a new workspace. If you want to change the settings in an existing workspace, use the run / debug configuration, as in fooobar.com/questions/184667 / .... vmargs in ini will no longer be read.

  • Be careful, you should set -XX: MaxPermSize = ... M, not -XX: PermSize = ..., the latter set the minimum starting PermSize.

  • ads. Jeremiah. It is useless to put mines and max in the same value. You are depriving Eclipse of adaptability. -Xms and -Xmx (heap) and PermGen and MaxPermGen should be different. (MaxPermGen = 256 by default)

0
source

Source: https://habr.com/ru/post/889823/


All Articles