Tuesday, May 21, 2013 Issue in Jboss 5.0.0.GA

The application team was complaining that they are seeing a lot of Out Of Memory When they try to deploy the application more than 3 times.

Now we Got the Heap Dump and checked the instances that were causing the heap To Full.
I found out that "" are being loaded and
causing the memory to fill.

As The references of "" are being loaded
highly and are taking more space in heap.

The reason for this is the VFS ( Virtaul File System) In Jboss. This Uses the temp location in JBoss to cache copies of Deployment Units as to speed up the performance of the
application Server.This also causes
the "" to load in to memory.

Besides that the default configuration for the VFS Cache repeatedly creates the Context
Objects and once it times out and these objects are ready for Finalization the GC could not
finalize these objects completely causing the heap To Grow faster

The Element that effects this was to prevent the caching of all deployment units and
cleaning up the Context objects are in

/config/jboss/ewp/5.0/domains/<Server>/conf/bootstrap/vfs.xml ( One of the Core File
For Changing the Virtual File Settings)

We need to change the Element realCache from IterableTimedVFSCache to

<property name="realCache">
<bean class="org.jboss.virtual.plugins.cache.TimedVFSCache"/>
<!-- <bean class="org.jboss.virtual.plugins.cache.IterableTimedVFSCache"/> -->

Once the Changes are done these Classes will not be loaded heavily .This is solved in Jboss 5.1.0

Happy learning :-)