I'm using unoconv or libreoffice to convert documents, odt->pdf
, by PHP exec()
. This process is very fast on one of my server (about 1s).
Now I have another, much faster server, and this process is taking almost 20s!
And it's with the same, small 20k files. I googled, I set the same configuration, and can't find any clues - what could be the reason?
Result is the same when i'm using unoconv, and libreoffice directly. When starting unoconv --listener
first, first conversion can be made in about 20 seconds. Then all conversions are fast again.
It seems that simple starting Libreoffice is taking a lot of time, but why?
It seems the answer was simple...
In processlist I can see:
It seems that LibreOffice is using IP and port for some internal communications, so I turned off the firewall (iptables) and it worked fine - from 20 seconds to 1 second!!
At the end I found, that IP6 can not be blocked on firewall for local connections, and that's what was causing the problem.
After I add this rule to
iptables.v6
configuration file, everything is working fine: