You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by prabha77 <pr...@gmail.com> on 2010/08/20 03:31:52 UTC

Out of Memory Error in Jetspeed 2.1.3

Hi all,

We are currently using Jetspeed 2.1.3 with pages stored in oracle.
Sometime back we had issues with database page manager.
We backported some of the code from JETSPEED-2.1.3-POSTRELEASE related to
Distributed Database Page Manager EhCache Cache Backport - backport
Now Once in every two days, the portal is resulting in OutOfMemoryError.

Looking at the heap dumps it looks like almost of the 50% of memory is
alloted to PageImpl and FragmentImpl. Dominator Tree in eclipse MAT shows
PageImpl and FragmentImpl when Grouped by Class as the top most objects in
the memory.
Solving this issue is really important for us to move the application to
Production.

I really appreciate any help in solving the issue.

Thanks
Prabha
-- 
View this message in context: http://old.nabble.com/Out-of-Memory-Error-in-Jetspeed-2.1.3-tp29488027p29488027.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


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


Re: Out of Memory Error in Jetspeed 2.1.3

Posted by Ron Wheeler <rw...@artifact-software.com>.
  What are you using for JVM memory limits?
Tomcat and Jetspeed need a lot.

The fact that something uses a certain percentage of the memory is not 
an issue.
Is it constantly growing in size?
If you increase the memory available, what happens? Can you stay up 
longer or do you still run out quickly.
What is taking the other 50%.
Are you careful about scope in all the portals? If you do not clean up 
carefully after each request, you can have memory leaks.
We have learned to be careful about "new" in application-scoped objects. 
You want to make sure that you are not creating a permanent "new" object 
for each request.

Ron


On 23/08/2010 3:40 AM, Joachim Müller wrote:
> Hi Prabha,
>
> what is the load on you machine?
>
> We implemented a special cleanup valve that cleans up the fragments
> after each request. It helped to improve the memory foot print.
>
> Joachim
>
>
>
> 	/* (non-Javadoc)
> 	 * @see
> org.apache.jetspeed.pipeline.valve.impl.CleanupValveImpl#invoke(org.apache.jetspeed.request.RequestContext,
> org.apache.jetspeed.pipeline.valve.ValveContext)
> 	 */
> 	public void invoke(RequestContext request, ValveContext context) throws
> PipelineException {
> 		super.invoke(request, context);
> 		ContentPage page = request.getPage();
> 		if (page != null) {
> 			Fragment root = page.getRootFragment();
> 			cleanFragmentsTree(root);
> 		}
> 		
> 	}
> 	
> 	/**
> 	 * Disconnect content fragment from fragment definition.
> 	 *
> 	 * @param root parent fragment
> 	 */
> 	private void cleanFragmentsTree(Fragment root) {
> 		if (root != null) {
> 			List fragments = root.getFragments();
> 			if (fragments != null&&  fragments.size()>  0) {
> 				//Process child fragments
> 				Iterator it = fragments.iterator();
> 				while (it.hasNext()) {
> 					Fragment child = (Fragment)it.next();
> 					cleanFragmentsTree(child);
> 				}
> 				
> 			}
> 			//Clean the given fragment
> 			if (root instanceof ContentFragment) {
> 				((ContentFragment)root).setPortletContent(null);
> 			}
> 		}
> 	}
>
>
>
> Am 20.08.2010 03:31, schrieb prabha77:
>> Hi all,
>>
>> We are currently using Jetspeed 2.1.3 with pages stored in oracle.
>> Sometime back we had issues with database page manager.
>> We backported some of the code from JETSPEED-2.1.3-POSTRELEASE related to
>> Distributed Database Page Manager EhCache Cache Backport - backport
>> Now Once in every two days, the portal is resulting in OutOfMemoryError.
>>
>> Looking at the heap dumps it looks like almost of the 50% of memory is
>> alloted to PageImpl and FragmentImpl. Dominator Tree in eclipse MAT shows
>> PageImpl and FragmentImpl when Grouped by Class as the top most objects in
>> the memory.
>> Solving this issue is really important for us to move the application to
>> Production.
>>
>> I really appreciate any help in solving the issue.
>>
>> Thanks
>> Prabha
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


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


Re: Out of Memory Error in Jetspeed 2.1.3

Posted by David Sean Taylor <d....@onehippo.com>.
Just want to point out, there are a number of patches that address
memory cleanup issues in the 2.1.4 release (July 13, 2010), including
a patch similar to the one below. I would suggest upgrading if
possible


On Mon, Aug 23, 2010 at 12:40 AM, Joachim Müller <jo...@wemove.com> wrote:
> Hi Prabha,
>
> what is the load on you machine?
>
> We implemented a special cleanup valve that cleans up the fragments
> after each request. It helped to improve the memory foot print.
>
> Joachim
>
>
>
>        /* (non-Javadoc)
>         * @see
> org.apache.jetspeed.pipeline.valve.impl.CleanupValveImpl#invoke(org.apache.jetspeed.request.RequestContext,
> org.apache.jetspeed.pipeline.valve.ValveContext)
>         */
>        public void invoke(RequestContext request, ValveContext context) throws
> PipelineException {
>                super.invoke(request, context);
>                ContentPage page = request.getPage();
>                if (page != null) {
>                        Fragment root = page.getRootFragment();
>                        cleanFragmentsTree(root);
>                }
>
>        }
>
>        /**
>         * Disconnect content fragment from fragment definition.
>         *
>         * @param root parent fragment
>         */
>        private void cleanFragmentsTree(Fragment root) {
>                if (root != null) {
>                        List fragments = root.getFragments();
>                        if (fragments != null && fragments.size() > 0) {
>                                //Process child fragments
>                                Iterator it = fragments.iterator();
>                                while (it.hasNext()) {
>                                        Fragment child = (Fragment)it.next();
>                                        cleanFragmentsTree(child);
>                                }
>
>                        }
>                        //Clean the given fragment
>                        if (root instanceof ContentFragment) {
>                                ((ContentFragment)root).setPortletContent(null);
>                        }
>                }
>        }
>
>
>
> Am 20.08.2010 03:31, schrieb prabha77:
>>
>> Hi all,
>>
>> We are currently using Jetspeed 2.1.3 with pages stored in oracle.
>> Sometime back we had issues with database page manager.
>> We backported some of the code from JETSPEED-2.1.3-POSTRELEASE related to
>> Distributed Database Page Manager EhCache Cache Backport - backport
>> Now Once in every two days, the portal is resulting in OutOfMemoryError.
>>
>> Looking at the heap dumps it looks like almost of the 50% of memory is
>> alloted to PageImpl and FragmentImpl. Dominator Tree in eclipse MAT shows
>> PageImpl and FragmentImpl when Grouped by Class as the top most objects in
>> the memory.
>> Solving this issue is really important for us to move the application to
>> Production.
>>
>> I really appreciate any help in solving the issue.
>>
>> Thanks
>> Prabha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

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


Re: Out of Memory Error in Jetspeed 2.1.3

Posted by Joachim Müller <jo...@wemove.com>.
Hi Prabha,

what is the load on you machine?

We implemented a special cleanup valve that cleans up the fragments
after each request. It helped to improve the memory foot print.

Joachim



	/* (non-Javadoc)
	 * @see
org.apache.jetspeed.pipeline.valve.impl.CleanupValveImpl#invoke(org.apache.jetspeed.request.RequestContext,
org.apache.jetspeed.pipeline.valve.ValveContext)
	 */
	public void invoke(RequestContext request, ValveContext context) throws
PipelineException {
		super.invoke(request, context);
		ContentPage page = request.getPage();
		if (page != null) {
			Fragment root = page.getRootFragment();
			cleanFragmentsTree(root);
		}
		
	}
	
	/**
	 * Disconnect content fragment from fragment definition.
	 *
	 * @param root parent fragment
	 */
	private void cleanFragmentsTree(Fragment root) {
		if (root != null) {
			List fragments = root.getFragments();
			if (fragments != null && fragments.size() > 0) {
				//Process child fragments
				Iterator it = fragments.iterator();
				while (it.hasNext()) {
					Fragment child = (Fragment)it.next();
					cleanFragmentsTree(child);
				}
				
			}
			//Clean the given fragment
			if (root instanceof ContentFragment) {
				((ContentFragment)root).setPortletContent(null);
			}
		}
	}



Am 20.08.2010 03:31, schrieb prabha77:
> 
> Hi all,
> 
> We are currently using Jetspeed 2.1.3 with pages stored in oracle.
> Sometime back we had issues with database page manager.
> We backported some of the code from JETSPEED-2.1.3-POSTRELEASE related to
> Distributed Database Page Manager EhCache Cache Backport - backport
> Now Once in every two days, the portal is resulting in OutOfMemoryError.
> 
> Looking at the heap dumps it looks like almost of the 50% of memory is
> alloted to PageImpl and FragmentImpl. Dominator Tree in eclipse MAT shows
> PageImpl and FragmentImpl when Grouped by Class as the top most objects in
> the memory.
> Solving this issue is really important for us to move the application to
> Production.
> 
> I really appreciate any help in solving the issue.
> 
> Thanks
> Prabha

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