Comments (9)
I improved the handling of signals, some signals might have resulted in Unoserver existing without Libreoffice exiting. I believe that now Unoserver should not quit and leave LibreOffice hanging, so that should at least solve THAT.
Why soffice is using 100% and doesn't exist, well, that's a different mystery. Can you try converting those specific files with just soffice?
from unoserver.
Thank you for the update, I'll update the version and see what happen. And I'll give it a shot as you suggested to see what happen.
Are you aware of a way to unceremoniously kill the soffice process after a timeout? Especially for the headless runs, we really don't want it to run forever.
from unoserver.
Okay, seems it's because killing unoserver
(SIGTERM) doesn't kill soffice
, and I have then multiple soffice
processes trying to connect to the socket.
Is there a preferred way to gracefully stop unoserver
so it properly kills the soffice
process?
from unoserver.
Hi,
It seems that unoserver is ignoring completely signals when hanging on
unoserver/src/unoserver/converter.py
Line 201 in c76c598
I could only kill it with a sigkill, which let intact soffice.bin processes. I'm running server and convert on different containers, so i can't kill by hand soffice.bin "incriminated" processes. If someone knows how to kill that...
from unoserver.
I could probably make the converter easier to kill in that situation, but that wouldn't change anything, the server is still hanging. There's no way for the converter to kill the server if it's hanging. Your problem here isn't with the converter, but with the libreoffice process.
from unoserver.
@Rafiot It's really hard to test how it behaves in different situations, but in the update what I did is that when unoserver gets a sigterm it just passes that on to soffice. It shouldn't exit unless soffice exits. If it does, just sigkill it instead, then it will send sigkill to soffice, and it will exit.
from unoserver.
I just noted that the problem mostly occurs for me on an ubuntu 20.04 server, but not on my dev box running Ubuntu 21.10. Could it be that the version of libreoffice on ubuntu 20.04 is not handling the signal properly?
And I'm thinking of an other way to handle the case: right now, I'm just launching unoserver
with Popen, but I should use the UnoServer
class instead and launch it with start
so I have the libreoffice process object that I can check and kill it if need to.
from unoserver.
Yeah, if you are running it from inside python, and are using the system python, using the class could be a good way to do it.
from unoserver.
It seems I solved it with a more recent libreoffice, and using the class directly.
from unoserver.
Related Issues (20)
- Issue with unoconverter initialization: Binary URP bridge disposed during call on Windows 10 HOT 1
- Error code -11 when converting docx to pdf via unoconvert HOT 7
- Details about concurrent executions of unoconv in the README could be useful HOT 5
- Unoserver PV6 Interface Support HOT 3
- Convert a specific PDF page to a PNG HOT 1
- Unoserver Hangs randomly HOT 3
- unoserver sometimes generates errored PDF files without crashing HOT 3
- Support for embedded images in HTML exports HOT 2
- Error converting from odt to txt HOT 1
- unoserver crash randomly HOT 4
- Setting PNG export resolution? HOT 4
- Setting page number for PNG export? HOT 1
- How to start service properly? HOT 5
- unable to start UnoServer from python HOT 1
- How to apply filter to export data from xslx to csv keeping utf-8 HOT 1
- Ability to set --infilter HOT 2
- DeprecationWarning Is this slated to be fixed? HOT 2
- Troubleshooting unoconvert Network Connection Error on Ubuntu 22.04 with Python 3.10 and LibreOffice 7.3.7.2 in a Closed Network Environment HOT 7
- Why --uno-interface defaulting to --interface value instead of 127.0.0.1 HOT 2
- The value of --host-location ignored for outfile HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unoserver.