New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibreOffice gets stuck #189
Comments
Hello dvandersluis, We're processing lots of doc, docx files, yes, we know LibreOffice is not ideal, and may sometimes just block, eating 100% CPU, sometimes it crashes. The question is: are their some best practices on how to use unoconv/LibreOffice:
.. I presume we should manually write watchdogs, do our own checks by PID etc? |
how can i get the libreoffice process manually in ubuntu shell!? On Tue, Feb 25, 2014 at 1:33 AM, oburlaca notifications@github.com wrote:
|
As an update, it seems that the listener is not actually necessarily stuck, but that it goes to sleep and doesn't get closed by unoconv. If I start unoconv again with a different port and using a different environment (as per http://ask.libreoffice.org/en/question/14841/how-can-i-use-soffice-from-the-command-line-when-quickstarter-is-running/?answer=29735#post-id-29735) I can continue to convert, despite the original listener still sticking around. Of course, since I'm running this automatically via a script, and not babysitting it, without some sort of solution I'll end up with a ton of sleeping soffice processes that will never be used or closed, so any assistance would be appreciated. 😄 |
any news about that ? |
Do you think killing |
@imkarthikk Normally unoconv takes great care in killing the soffice it spawned itself for the conversion (except if we use an existing listener, or if there was another user of the running listener), so there shouldn't be a need to kill it. However, if it gets stuck and unoconv is interrupted, the started listener may still be around. So maybe it makes sense to do it just to be sure, however the real fix is to reproduce this and open an bug in the LibreOffice bug-tracker. If it is reproducable, you may want to test if LibreOffice can handle the file properly. |
Hello @dagwieers , I have the same problem with the LibreOffice process and I have a question about the On unoconv#L1264, Since Python 3.3, Popen.wait has a timeout option. But to support previous version of Python, should unoconv#L1264 and unoconv#L1270 be replaced by something like the following lines of code ? start = time.time()
timeout = 30
while time.time() - start < timeout:
time.sleep(0.1)
if ooproc.poll() != None:
break With this code, it will wait and if after 30 seconds the libreoffice process is still running, it will try to kill it. What do you think about this ? |
Sometimes the instance of LibreOffice opened by unoconv gets "stuck" (in that it doesn't so anything and doesn't close either), even though I'm using the -T (timeout) option when initializing unoconv. The unoconv process doesn't terminate either, until I kill LibreOffice.
Is there any way to detect if the listener has frozen (or whatever's actually going on), and have unoconv kill it once the timeout expires (assuming I'm not using a permanent listener, which I'm not), or at least exit with some sort of error that I could handle myself (a PID would be helpful)?
The text was updated successfully, but these errors were encountered: