Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Thomas Keßler
Memoryleak in Liferay Portletbridge 3.1.0-ga?
17. Oktober 2012 08:24
Antwort

Thomas Keßler

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 20. Dezember 2010

Neue Beiträge

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?
17. Oktober 2012 09:13
Antwort

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2137

Eintrittsdatum: 26. Juli 2005

Neue Beiträge

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?
18. Oktober 2012 23:54
Antwort

Thomas Keßler

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 20. Dezember 2010

Neue Beiträge

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?
19. Oktober 2012 00:16
Antwort

Thomas Keßler

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 20. Dezember 2010

Neue Beiträge

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?
22. Oktober 2012 04:40
Antwort

Thomas Keßler

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 20. Dezember 2010

Neue Beiträge

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?
30. Oktober 2012 13:26
Antwort

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2137

Eintrittsdatum: 26. Juli 2005

Neue Beiträge

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