cancel
Showing results for 
Search instead for 
Did you mean: 

PDF in doc library causes memory leak ?

manudehanoi
Champ in-the-making
Champ in-the-making
Hello,
I'm running 3.4d and I've got only (*sigh*) 800mb of available RAM for it. To avoid the permgen problem I'm running the packaged tomcat on Jrockit JVM (But issue is prolly the same under the normal sun JVM in the package).

Alfesco is running fine with -Xmx350m (350megs of heap space), and I used visualJM to confirm that. However the total memory usage of the tomcat service (under win 2008 server), is around 650m after launching, and stays stable until

- I enable the "Recently Modified Documents" dashlet on a site dashboard (only 2sites so far, with less than 50 docs total). Then although the heap memory stays constant at 350m (as witnessed on visualJM ), the tomcat6 process memory usage (in task manager) increases rapidly (less than a minute) to over 800m untill the process crashes.
- Same problem occured when opening a folder in the document library of the site
- I could delete the pdfs using "/alfresco", it was imposible to access them from "/share" without crashing tomcat
- After deleting the culprit docs I could enable the "Recently Modified Documents" dashlet without crashing tomcat

There is some issue with whatever component is processing the PDFs and allows to shutdown tomcat through a memory hog/leak. I cant upload the PDF here because it's a company doc, but it seems to be a PDF generated from a ms word doc (docx) with a (cracked?) acrobat distiller 9.0.0. Will try to create another another one and post it on monday for testing.
Cheers
3 REPLIES 3

manudehanoi
Champ in-the-making
Champ in-the-making
I managed to create a test pdf and I've uploaded it here :
http://www.mediafire.com/?p29kzi9m35gwdew
As you can see the PDF opens correctly, doesnt even seem corrupted and at 25kb it cant pack much damage
to replay the bug :
- login to yourdomain.com/share
- choose a site,
- go the the document library and upload the pdf. Before you do so, open the task manager and watch the memory usage of the alfrescotomcat service while you press the button upload and the few seconds afterwards.


Memory climbs, climbs, untill the computer is out of memory then the service explodes Smiley Happy

kevinr
Star Contributor
Star Contributor
Sounds like a bug in the 3rd party library used by Alfresco to process PDFs (PDFBox, Tikka or OpenOffice etc.)

Fortunately we have hired one of the contributors to Tikka and he is able to debug the issues directly and contribute fixes back to Apache. So I'll raise a bug and attach the PDF so that  he can take a look.

Thanks,

Kev

manudehanoi
Champ in-the-making
Champ in-the-making
in the mean time can someone tell me how to disable pdf processing so that pdfs are treated like unknown file types ? Thanks
EDIT: I've commented out the PDF file type in mimetype-map.xml, and the application runs fine now.