Combination View Flat View Tree View
Threads [ Previous | Next ]
Thomas Keßler
Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 17, 2012 8:24 AM
Answer

Thomas Keßler

Rank: New Member

Posts: 4

Join Date: December 20, 2010

Recent Posts

Hi,

while running load tests we experienced some trouble with the class com.liferay.faces.bridge.scope.BridgeRequestScopeImpl.
VisualVM blamed it to hold an increasing amount the heap, finally 80%.

Our setup is: Weblogic Server 12.1.1, Liferay Portal 5.2 EE SP5, JSF2

Has anyone seen such behaviour before?

ciao
Thomas
Neil Griffin
RE: Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 17, 2012 9:13 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2228

Join Date: July 26, 2005

Recent Posts

Just curious -- do you have the following set to true in your WEB-INF/web.xml descriptor?

1<context-param>
2 <param-name>[b]com.liferay.faces.bridge.bridgeRequestScopePreserved[/b]</
3param-name>
4 <param-value>[b]true[/b]</param-value>
5</context-param>
Thomas Keßler
RE: Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 18, 2012 11:54 PM
Answer

Thomas Keßler

Rank: New Member

Posts: 4

Join Date: December 20, 2010

Recent Posts

Hi,

thanks for you very quick answer!

No, the parameter has not been set in the web.xml.

ciao
Thomas
Thomas Keßler
RE: Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 19, 2012 12:16 AM
Answer

Thomas Keßler

Rank: New Member

Posts: 4

Join Date: December 20, 2010

Recent Posts

Hi,

I've take a look into the sources of the Bridge. It looks like the cleanup-Methods in BridgeRequestScopeManagerImpl are never called on weblogic server 12.1.1 running liferay 5.2.

ciao
Thomas
Thomas Keßler
RE: Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 22, 2012 4:40 AM
Answer

Thomas Keßler

Rank: New Member

Posts: 4

Join Date: December 20, 2010

Recent Posts

Hi!

I have found the cause of the memory leak. The BridgePhaseRenderImpl did not cleanup the bridgeRequestScopeCache correctly.

Here's the code snippet with my local bugfix of com.liferay.faces.bridge.BridgePhaseRenderImpl::cleanup

 1    @Override
 2    protected void cleanup() {
 3
 4        // If required, cause the BridgeRequestScope to go out-of-scope.
 5        if ((bridgeContext != null) && !bridgeContext.isBridgeRequestScopePreserved()) {
 6            bridgeRequestScopeCache.remove(bridgeRequestScope.getId());
 7        }
 8
 9        super.cleanup();
10    }



Could you please merge the bugfix into the next releases of the portlet bridge?

ciao
Thomas
Neil Griffin
RE: Memoryleak in Liferay Portletbridge 3.1.0-ga?
October 30, 2012 1:26 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2228

Join Date: July 26, 2005

Recent Posts

Hi Thomas,

Thanks so much for reporting this problem. It actually occurs in two places in that class. The bug has been fixed in FACES-1445 and will appear in the next release.

Best Regards,

Neil