Jack, welcome to the JBoss forums!
Are you running a 32-bit or 64-bit OS, and if a 64-bit OS, is your JVM 32-bit or 64-bit? With a 32-bit JVM your heap size is usually limited to around 1.5GB to 2.5 GB, depening on the OS you are using and on how the OS is configured.
If you need a larger heap, you will need a 64-bit JVM (which will run only on a 64-bit OS).
Needless to say, this is entirely a JVM issue, the version of JBoss AS has no bearing on this.
Thanks so much for the reply, Currently i am running RHEL5 w/ Jboss 4.0.4-GA, i am pretty sure its only a 32bit operating system
Is there any other way i can squeeze out more memory for the JVM running on my machine?
Installing a 64bit JVM is pretty out of the question as i am running a 32bit O/S as mentioned.
Any ideas on what configurations i can do on my OS to allot greater memory space to the JVM ?
from what I can read you have met memory limitations too early (probably you haven't been able to allocate even 1.6GB).
You should investigate at first what kind of kernel you are running (hint: uname -a) because linux k
kernel 2.6 should be able to allocate at least 2Gb.
If you are running a new kernel (>=2.6) then it's likely that the JVM cannot find a contiguous block of memory to be allocated: in other words the JVM requires a single chunk of memory (not fragmented) at startup.
I'm not an expert sysadmin but maybe setting the linux kernel to use larger pages and allowing the JVM to use it (XX:+UseLargePages) could do the trick....see this article in the section "Linux tuning parameters"
P.s. consider that too large Java Heaps (> 2.5 G) will cause GC pauses to become potentially troublesome.
Hope it helps
Wow, that was very helpful thanks!
I do agree totally that i am hitting the memory limitations too early (that why it baffles me).
The kernel that is currently running on my machine is indeed 2.6 and above.
Prior to this machine i was running a much older machine on a 2.4 Kernel (RH9) and that machine naturally was lower spec-ced and all but it had no such issues what so ever.
I really don't think the a slight increase of users on my application would cause this crash.
The link was very helpful!
Thanks so much!
You should also analyze some heap dumps, they might help you determine where your app is creating or holding on to too many objects. You cna use tools such as jmap (comes with JDK 5), VisualVM (comes with JDK 6 or you can downlaod separately, needs JDK 6 to run but will analyze JDK 5 heaps) or Eclipse MAT. This way you can reduce the memory equirements for your app.