• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please Help with Java_OPTS setting

 
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello we are getting the out of memory message Java heap. I got this message before a couple of years ago with GlassFish running Apache, but now I am running Eclipse Helios with JBoss 5.1GA. I do not know what to do.

I tried adjusting the virtual memory and we have 32Gb of RAM on this server. My application is about 1gb in size.

I do not see a Java_OPTS environment variable.

I mean I don't see anything like what you would see in a Java_Opts environment variable.

I did some research and I could not find a place to start with the setting. We are running Microsoft WindowsXP, 64bit.

Thanks,
Michele
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to look in the jboss bin folder (I think) and modify run.bat or run.sh

I know this was the way in 4.3 and certain things have changed in 6 EAP / 7 GA

WP
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William, do you have any suggestions on what I should specify as a setting there?

I mean like a starting place to start from?

Also do you think that the Java_OPTS is necessary or just change the file you mentioned in your email.

Thanks,
Michele
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The setting for the Java_OPTS is

JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx2048m -Dsun.rmi.dgc.client.gcI
nterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
changed to -Xms8192m -Xmx8192m -Djboss.vfs.forceCopy=false"

still same problem.

Thanks,
 
William P O'Sullivan
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How long does the application run before you get the heap error?

WP
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I have gone through a bunch of jirations on this and now it does not time out at all, it just spins.

Thanks,
 
Greenhorn
Posts: 26
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Michele,

Just incase you have not found the right place to put the environment variables, you can find the same in run.conf for "default" configuration of JBOSS server. I also hope you are aware that there is no one-size-fits-all -xmx and -xms setting. Moreover, just because we have a high RAM available, we must not set the heap size high. the simple reason is that the higher the heap size, more time will be taken by JVM to clear the objects in heap. There are many articles on the internet that would help you set a good heap size. You would need to simulate your production/ real life environment and keep adjusting your heap size untill you get a fix on one specification. the following list would be my consideration.

1. Number of concurrent users.
2. Size of objects getting created.

Based on this it would be better to profile the application and/ or do a load test or stress test. This would ensure you have a better number for -xmx and -xms. Also do have a look at the Sun Specification that talks about rules regarding setting the heap size and of other parameters.

Between, I am still not sure if your previous message meant that the "system works like charm"


Would be happy to help. Kindly post a few more details.


Thanks and regards,
Raghav.V
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I will think about this and get back to you by next Monday,

Thanks again!!!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic