unoconv / unoserver

MIT License
496 stars 69 forks source link

Memory Leak in LibreOffice #55

Closed eman-hamed closed 1 year ago

eman-hamed commented 1 year ago

I'm using unoserver/ unoconvert to convert bulk files to JPG format using Docker. I have a large number of files that need processing so my server is always up and running, converting each file one by one sequentially. However, after 2-4 hours of work, the conversion processes start getting stuck, and then soon the whole docker container is down, and I have to manually restart it. When checking the memory while it was stuck I found that the process soffice.bin holds 10GB of memory. The unoserver starts automatically with the container starts, then I only call unoconvert command for each file. I'm thinking that maybe LibreOffice is not releasing the files after loading and converting them. I looked through the README again to see if there's a configuration I can set that will allow me to free up memory after each conversion, but I didn't find any. Is there a way to implement that? Thanks and regards.

regebro commented 1 year ago

LibreOffice should release the memory, if it doesn't that's a LibreOffice bug.

It seems to me this can be triggered by documents that fail to convert, sometimes. If you can find specific documents that trigger this you could probably file a LibreOffice bug report.