• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

how to set maximum heap size in jboss-4.2.3.GA?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got 4gb of RAM. If i tried to set JAVA_OPTS to 2048m (ie. set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx2048m)

I am getting the following error

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


Any suggestions on how to increase the heap size ?

Thanks in Advance
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on your OS. If you have a 32 bit OS, then the max you could set it to is 2gb.

Also note that you kept the min to 512M, normal practice is to keep the min and max the same, so try -Xms2g -Xmx2g

If that doesn't work, then go with 1900 on both.

If this is a production box, then you might consider having two instances running on the same machine so you don't waste the extra 2GB ram you have in the box.

Mark
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which OS are you running? If Windows, the maximum heap size you can specify is around 1.7GB (though just now trying it I needed to get -Xmx down to 1500M before it would run).

Apparently, the JVM verifies that it can allocate the maximum heap size before it runs, so you must set the maximum to a small enough value to fit within the process' address space.
 
Squanch that. And squanch this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic