portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Müller <joac...@wemove.com>
Subject high memory consumption, possible fix
Date Tue, 06 Nov 2007 20:59:16 GMT
Hi all,

we are experiencing very high memory consumption on a system based on
Jetspeed 2.1 under very high load. (OutOfMemory within a couple of minutes)

There are 2 fix that are proposed to us. First addresses the decoupling
of the PortletContent from all ContentFragments of a page in
CleanupValveImpl:

((ContentFragment)fragment).setPortletContent(null);


The second fix addresses the release of all attributes from velocity
context incl. removing cycling references in the
JetspeedVelocityViewServlet (service method):

...
Context ctx = (Context) renderRequest.getAttribute(VELOCITY_CONTEXT_ATTR);

renderRequest.removeAttribute(VELOCITY_CONTEXT_ATTR);
renderRequest.removeAttribute(PortalReservedParameters.JETSPEED_POWER_TOOL_REQ_ATTRIBUTE);

JetspeedVelocityPowerTool jpt = (JetspeedVelocityPowerTool)
ctx.get(JETSPEED_TOOL_VAR_NAME);

if (jpt!=null){
	jpt.setVelocityContext(null);
	ctx.remove(JETSPEED_TOOL_VAR_NAME);
}
				
Object[] keys = ctx.getKeys();
//Delete all attributes
for (int i = 0; i < keys.length; i++) {
	ctx.remove(keys[i]);
}
...

(already adapted to 2.1.2)


Since this is kind of rough I would like to discuss this with the
developer list.

I also know, that Scott was working on replacing the standard hashmap
caching in org.apache.jetspeed.profiler.impl.JetspeedProfilerImpl and
org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl.
Scott, can you already share some of your results?

Best regards,
Joachim

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message