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.
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
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.
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
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.)