cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco is taking too much memory : Memory Leak

osho
Champ in-the-making
Champ in-the-making
I am working on a wrapper above Alfresco 3.1 Stable Edition. Ours is a J2EE App which talks to Alfresco using web scripts. Our app and Alfresco war both are deployed in JBoss 4.2. I have been hit by a High Memory usage, which possibly can be a memory leak in Alfresco.

Our app extends the folder type to include some (~15) additional meta props. file (content) type has also been extended to include ~15 meta properties. So, we have defined our custom folder and files.

My System Configuration is:
64 bit Jvm 1.6 running on Windows Server 2008 R2, core 2 machine with 6 GB RAM. SQL Server 2008 is the DB. I am using JMeter to talk to our app, which eventually talks to our Alfresco plugin using Webscripts.

In the following discussion, memory will mean old gen memory only.

I attached JConsole to the JVM running JBoss. initial memory consumption was 160m. I added 1000 custom folders and a single xml file in each folder. Files differ (content and name wise) by some strings only and are very small (0.6 KB). Memory consumption started to increase, went upto 1.5 Gb and settled down at around 500m. Settled down means  I did GC manually quite a times using JConsole. I added 1000 more folders and similar 1 file in each folder and the memory settled at 800mb. Added the same amount of data more, and it settled at 1GB. More same data and it settled at 1.16 Gb. As I have told earlier, all files added so far differ by some strings (content wise) only.

I took the heap dump and analysed with jhat (show instance of all classes excluding platform). There were so many objects of different classes, but what took my attention was many objects of classes realted to Lucene Indexing. Should they be there? Objects of classes lucene.index.FieldInfo, lucene.index.Term , luene.index.TermInfo , .lucene.index.TermBuffer, lucene.store.RAMFile, lucene.store.RAMDirectory, lucene.index.CompoundFileReader$CSIndexInput, lucene.store.RAMInputStream, etc . Count for some of these instances reaching upto 200000. Is Lucene eating up the memory?  Other user as also reported similar problem : http://forums.alfresco.com/en/viewtopic.php?f=9&t=18791&p=61675&hilit=leak#p61675. Wiki has a page for similar problem : http://wiki.alfresco.com/wiki/Lucene_Extensions_and_Issues but there is no update on it (whether the issues has been fixed in 3.1). I have scanned my app's code thoroughly and can assume that there is no leak from there. Issue seems to be on Alfresco side.

This problem has become a show stopper for us. Any help would be more than greately appreciated.

-Osho
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
You should contact Alfresco support.

And you probably need a service pack or patch.

wakkarat
Champ in-the-making
Champ in-the-making
Are these service packs and patches available to community users?  The problem described here is a longstanding one.

osho
Champ in-the-making
Champ in-the-making
I have found the solution to my problem. Find the details at http://sangosthi.blogspot.com/2010/01/alfresco-is-taking-too-much-memory.html.

mikel_asla1
Confirmed Champ
Confirmed Champ
Thank osho for posting your solution! much apreciated