| Author |
Please Help with Java_OPTS setting
|
Michele Smith
Ranch Hand
Joined: Oct 27, 2010
Posts: 298
|
|
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
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
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
Joined: Oct 27, 2010
Posts: 298
|
|
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
Joined: Oct 27, 2010
Posts: 298
|
|
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
Joined: Oct 27, 2010
Posts: 298
|
|
changed to -Xms8192m -Xmx8192m -Djboss.vfs.forceCopy=false"
still same problem.
Thanks,
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
How long does the application run before you get the heap error?
WP
|
 |
Michele Smith
Ranch Hand
Joined: Oct 27, 2010
Posts: 298
|
|
Hello I have gone through a bunch of jirations on this and now it does not time out at all, it just spins.
Thanks,
|
 |
Raghav Viswanathan
Greenhorn
Joined: Apr 26, 2012
Posts: 25
|
|
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
|
Better late than never.
|
 |
Michele Smith
Ranch Hand
Joined: Oct 27, 2010
Posts: 298
|
|
Thank you, I will think about this and get back to you by next Monday,
Thanks again!!!
|
 |
 |
|
|
subject: Please Help with Java_OPTS setting
|
|
|