cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve Memory Leak issue in alfresco 5.2?

faizrahk
Confirmed Champ
Confirmed Champ

Hi,

Iam facing memory leak issue in alfresco 5.2, Can any one tell what is the common reason for memory leak in alfresco 5.2 and how to solve it.

we have 64gb of ram in our windows server. and 60gb memory is being consumed. and shows 95% memory utilization and suddenly db connection will get depleted and i have to restart the services again and again. this happens every day.

just for information we have enabled ldap configuration for two ous.

Kindly help.

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

I do not understand why people increase their Xmx/Xms settings to insane levels without understanding their Java process memory use. As you can see from the analysis of your memory dump, the entire heap usage is only around 800M. That means by setting heap to 30G you effectively assign about 37x the memory than you are using. By reducing the excessively large values for Xmx/Xms to a more reasonable 8G for example (unless you absolutely are sure that you have peaks where you need more), you should be able to reduce the overal memory utilization.

I also bet that if you were to check via the Windows task manager, it would show a resident working set for the Java process around 40G or so, far from the 95% utilization. The 95% utilization is the full total of all processes on the Windows host. So you should also look for other services / tasks running on the Windows host that may consume a significant bit of memory.

View answer in original post

9 REPLIES 9

angelborroy
Community Manager Community Manager
Community Manager

You can start by examining a Thread Dump when your server is busy.

This will tell you what Java process are running.

Hyland Developer Evangelist

afaust
Legendary Innovator
Legendary Innovator

First you should try to differentiate which process is actually taking the memory. You say 60 GiB of memory is used on your Windows server, but not which process is actually using what amount of memory. So go to your task manager and identify which specific service / task has a large resident set / memory usage. If that service / task is not a Java process, then the memory leak is actually not "in" Alfresco, but some 3rd-party component either bundled by Alfresco or actually part of the operating system.

Also please provide your Alfresco / Tomcat Java process parameters, e.g. anything that relates to the Xms / Xmx parameters. Typically, the Alfresco process will be configured with a set range of min/max memory size and would not be allowed to grow indefinitely.

faizrahk
Confirmed Champ
Confirmed Champ

Hi,

I have configured both min and max heap size as 16gb. No other processes are consuming more memory except alfrescotomcat. and if we increase maximum heap size to 30GB then it will consume all of 30GB memory and memory consumption shows more than 93% when we see in task manager.

please find the heap dump screen shot attachments generated. Kindly help

afaust
Legendary Innovator
Legendary Innovator

I do not understand why people increase their Xmx/Xms settings to insane levels without understanding their Java process memory use. As you can see from the analysis of your memory dump, the entire heap usage is only around 800M. That means by setting heap to 30G you effectively assign about 37x the memory than you are using. By reducing the excessively large values for Xmx/Xms to a more reasonable 8G for example (unless you absolutely are sure that you have peaks where you need more), you should be able to reduce the overal memory utilization.

I also bet that if you were to check via the Windows task manager, it would show a resident working set for the Java process around 40G or so, far from the 95% utilization. The 95% utilization is the full total of all processes on the Windows host. So you should also look for other services / tasks running on the Windows host that may consume a significant bit of memory.