This discussion is archived
0 Replies Latest reply: Dec 7, 2012 2:57 PM by 971603 RSS

Calling remote EJB fills permgen space

971603 Newbie
Currently Being Moderated
I am working with an application developed in Workshop for Weblogic 10 MP1. The application is deployed as an EAR and contains web content as well as EJBs. The EJBs are configured as remote even though they are in the same EAR package as they are used by some other applications as well.

Due to the size of the application we we're frequently running out of memory in Workshop. Compiling the EJBs took long time and we could not use 64 bits OS. Therefore we decided to split the application into two, where one part consisted of the Web content and the other only the EJBs.

Splitting the application went fairly well. We exported the EJBs as a jar and put the jar into the Webapplication (EarContent/APP-INF/lib). However, even though it works, it does not work well. After the split, we have a major increase of Full Garbage Collection (approx. 900 each day from 1-2 before).

The class loading log shows that for each call to an EJB one class is loaded. If one user performs 10 identical actions, 10 classes will be loaded. Needless to say, with 800 users, perm gen is rapidly filling up until max. When hitting max, a Full GC is performed freeing about 100MB (mostly WLStub). Afterwards it starts to fill again.

Class loading log shows that there seems to be only WLStub-classes that load multiple times. First time a JSP-page is loaded, the classes are loaded as well. When the same JSP-page is visited again, no classes need to load. However, when invoking an EJB from the JSP-page, a WLStub is loaded. When a Full GC is performed, WLStub classes are unloaded.

As this problem started after splitting the project into two parts it seems like we misconfigured the EJBs but we’re unable to figure out where.

Log snippet:
Call EJB 3 times:
[Loaded g.ejb.session.stateless.customer2listservice.Customer2ListService_9ce45y_EOImpl_1001_WLStub from file:/C:/Bea10/modules/com.bea.core.utils.wrapper_1.0.1.0.jar]
[Loaded g.ejb.session.stateless.customer2listservice.Customer2ListService_9ce45y_EOImpl_1001_WLStub from file:/C:/Bea10/modules/com.bea.core.utils.wrapper_1.0.1.0.jar]
[Loaded g.ejb.session.stateless.customer2listservice.Customer2ListService_9ce45y_EOImpl_1001_WLStub from file:/C:/Bea10/modules/com.bea.core.utils.wrapper_1.0.1.0.jar]

What can we do to limit class loading to only one class per EJB?

BR

//Alex

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points