-
Notifications
You must be signed in to change notification settings - Fork 83
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
Does not seem to properly handle death of LibreOffice? #135
Comments
I have submitted a PR to address this issue. |
I'm pretty sure this is related to my bug. Traceback (most recent call last): |
Probably related. As a test, I launched unoserver with a small memory limit to see how OOM could be handled:
IIUC, this makes LO crash but not unoserver itself, which results in
My issue is that the client holds forever trying to connect. I'd like it to return an error after a reasonable timeout. In this case, it is a connection timeout, not even a conversion timeout, which makes it easier (conversion might be arbitrary long but connection should be fast). Relaunching LO is another thing. But having a timeout here would make for more graceful error management. I thought this was the point of #119 but it seems not. Basically, what I'm thinking of is unoserver using a timeout to catch the connection error above and return a nice error to the (possibly remote) client. We could also add a timeout client-side. The difference is it would also manage network issues between client and unoserver, and unoserver itself being down / shut off. In fact, the client-side timeout might be more useful. But unoserver side, we could catch connection issues (can't connect to LO) right away rather than wait for a possibly long conversion. I hope I'm making sense. There might be a way to achieve client-side timeout in user code but I don't think it is straightforward, so a simple |
#119 is a related problem; a timeout/kill/restart works, but current code still does not respond properly to the death of libreoffice. My solution to this problem has been to:
This all seems to work. The critical part is having unoserver die when LibreOffice dies. Another approach would be to have unoserver restart LibreOffice if it dies and was not killed by unoserver, though that comes with unoserver having to make management decisions about how often to try to restart etc, which is why I like the supervisord solution. |
Yes, unoserver should exit if LibreOffice dies. There must be some case this doesn't happen after the 2.0 refactoring. I'm hoping to get time to test the PR soon. |
If it helps at all the problem occurs because the RPC thread does not terminate. Sadly, closing the port is not enough to make it terminate, at least on some stacks (and perhaps python versions?), so one also has to send a dummy connect request. My testing was all done on Ubuntu x64. |
That had other weird issues, and after much debugging those went away if I waited with terminating LibreOffice to after the RPC process has terminated. Heck knows why, but it seems to work more reliably now anyway. New release will hopefully come this week (maybe even today). |
2.3b1 is now released |
LibreOffice very occasionally crashed, and some documents make it CPU bound; for the latter I would like to kill it.
Unfortunately, it seems that unoserver does not detect when LibreOffice dies and does not restart it.
I am using a Docker image wit supervisord; can unoserver be modified to die when libreoffice dies (or restart libreoffice)?
Steps to reproduce:
unoserver does not die
The text was updated successfully, but these errors were encountered: