Pages

Tuesday, May 21, 2013

org.jboss.virtual.plugins.context.zip.zipentrycontext 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 "org.jboss.virtual.plugins.context.zip.zipentrycontext" are being loaded and
causing the memory to fill.

As The references of "org.jboss.virtual.plugins.context.zip.zipentrycontext" 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 "org.jboss.virtual.plugins.context.zip.zipentrycontext" 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
TimedVFSCache.

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

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

Happy learning :-)