cancel
Showing results for 
Search instead for 
Did you mean: 

Soffice use a lot of memory

dranakan
Champ on-the-rise
Champ on-the-rise
Hi,

One user has added a new document and the server get problems 😞

soffice.bin uses a lot of memory and after that the server is swapping…
The server has 8GB and after the import of the document, soffice.bin uses 4 GB (soffice do the preview).
soffice.bin keeps these 4 GB after the preview of the document. The preview is well done. (I can see it using "ps -aux").

I have tested libreoffice 3.6 and 4.0… the problem is still the same.  (I can't use openOffice because I get bugs with others .doc).

The .doc is 3 mb. It has some pictures inside.

Has someone an idea to help me ?

Using jodconverter and option (jodconverter.maxTasksPerProcess=2) should help me but I am using Alfresco commmunity (and jodconverter is only for enterprise).

Thank you.


Linux 5.6 64bits, Alfresco 4.0D.
4 REPLIES 4

marcus_svensson
Champ in-the-making
Champ in-the-making
Large memory usage of openoffice can often be related to memory leaks in open office.

As you say, going enterprise would be one way of doing it. The other would be to manually control the OpenOffice process. You could have a script which kills the process every now and then starts it up again. I've done this in a case where we run OpenOffice at a separate server and Alfresco has no way of starting or stopping the process itself.

Change the configuration which polls for OpenOffice to run every 5 seconds. (This is controlled via the global properties setting: openOffice.test.cronExpression=*/5 * * * * * ?)

Kill open office
sleep 6 seconds (to make sure the tester picks up that openoffice is down
Start open offfice

Hi Marcus,

Thank you.

We are trying to add jodconverter in Alfresco Community. At this time, we don't know if it's possibe…

Your proposition is a good idea. How do you check than soffice is not running before killing ?

Using soffice on another server is better. But can you do it with Alfresco community ?

marcus_svensson
Champ in-the-making
Champ in-the-making
A sample script for controlling Open Office on a server can be found here: https://code.google.com/p/alingsas-kommun-alfresco/source/browse/alfresco-start-scripts/ooffice

That script will check if the process is running before killing.

I think you can run open office on a different server using the community version of alfresco. The configuration can be found on the alfresco wiki:
http://wiki.alfresco.com/wiki/Running_OpenOffice_From_Remote_Machine#From_3.4.11_and_4.1.1

Hope this helps you.

Thank you Marcus.

The pkill command kill the process without waiting if a process is running. (test with libreoffice 3.6).

There no option (ooo.host=… ) with Alfresco 4.0.D with it exists with 4.2.c. We will use another server to run soffice… it's safer. Thank you.

I see that soffice run with the same priority than alfresco. I think it's perhaps better to set low priority : "nice -n 9 …".