-
1. JBOSS out of swap space error
wdfink Mar 20, 2011 6:43 AM (in response to bhavin2002patel)If I look to your JAVA_OPTS settings, I found that '-Xms128m-Xmx1024m' is without a space, could you correct this!
If you deploy more war files the server might use more memory, MaxPermSize is additional to the 1024m Heap size and this might produce the error.
You should post a bit more information about your memory (without and with the deployed additional war files).
You can use <JAVA>/bin/jstat -gc to view the actual memory sizes.
If the JVM could not get more memory from the system increasing of RAM might help, maybe you can check it before if you stop other application and services.
-
2. JBOSS out of swap space error
bhavin2002patel Mar 20, 2011 7:14 AM (in response to wdfink)I checked by run.bat file there is a space. But since i copied from word documentation it appears differently.
following is the setting i have in run.bat.
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m
-
3. JBOSS out of swap space error
wdfink Mar 20, 2011 7:22 AM (in response to bhavin2002patel)Could you run 'jstat -gc <PID> 1000' in parallel if you start JBoss to see the memory utilization?
See http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html for more information.
-
4. Re: JBOSS out of swap space error
bhavin2002patel Mar 20, 2011 10:29 AM (in response to wdfink)I tried this command on command prompt. But it says file not found.
However if i just type jstat it does show me available options, which are very few compared to the link that you send me.
Is there any utility to be downloaded?
Also is <PID> needed to be replaced with process ID? there is no process running as i am run.bat file.
-
5. JBOSS out of swap space error
wdfink Mar 20, 2011 11:36 AM (in response to bhavin2002patel)jstat is a tool shipped with java look into the bin directory of your installation of JDK.
The PID is the processId of the JVM, look into the taskmanager for the java process of JBoss and use this..
You might see the memory used by the JVM as OC/EC/PC
-
6. Re: JBOSS out of swap space error
peterj Mar 21, 2011 3:06 PM (in response to bhavin2002patel)Will this problem be resolved by increasing the RAM?
Yes. 2GB is too little RAM for a 64-bit Server system. You could also increase the pagefile size, as long as you don't mind slow performance. ;-)
But i recently deployed some war files needed by application and i have started getting this error.
I doubt that this caused the problem. Most likely a recent Windows update increased the memory requirements for Window itself, or you are now runnign some extra app or service on that box. The error "out of swap space" essentailly means that there is not enough free memory (between RAM and the pagefile) to run the app (which is the JVM running JBoss AS in this case). Provided that you did not change the JVM statrup parameters (max heap size, max permgen size) then the JVM will not be taking up any more memory on startup than what it was before those additional WARs were deployed. (There could be an issue later, though, it deploying those WARs would cause more HTTP threads to be created, but that would result in an different error message.)