-
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
Parallel Unoserver with different ports hangs/gets stuck #16
Comments
This is the correct place, and that should work in theory, although I have never tried joblib. I hope to get time to look at the unoserver backlog soon. The output above looks correct. What happens when you try to start a conversion with |
Hi @regebro I made some progress but came across another roadblock. So, I realized I have to have the unoservers started in a separate process, so I have my unoservers in a separate file and ran it prior. In my pdf conversion file, I try to connect via this command:
This is my error output: This is all done on separate cores. Any advice? |
That should work. |
Welp, it doesn't work though:/ |
If this is still an issue, you're probaly hitting what I did - each conversion server instance now uses two tcp ports. Add --uno-port $((port+100)) or something. |
Good point, but that change happened in October 2023, so that's not the original problem. :-D |
Hi, not sure if appropriate to post here or not, please close/remove if so.
I'm trying to parallelize the conversion of files to PDF using unoserver based on this on the bottom of the page:
You should be able to on a multi-core machine run several unoservers with different ports. There is however no support for any form of load balancing in unoserver, you would have to implement that yourself in your usage of unoconverter.
What I did:
I'm using joblib to parallelize using cores and assigning each instance an id value. Each instance does an
os.system("unoserver --port " + str(port))
I see this as the output but it hangs there and doesn't proceed to the rest of the code where it'd start the actual conversion.
[Parallel(n_jobs=2)]: Using backend LokyBackend with 2 concurrent workers. INFO:unoserver:Starting unoserver. INFO:unoserver:Command: libreoffice --headless --invisible --nocrashreport --nodefault --nologo --nofirststartwizard --norestore -env:UserInstallation=file:///tmp/tmp35cy3xi9 --accept=socket,host=127.0.0.1,port=2000,tcpNoDelay=1;urp;StarOffice.ComponentContext INFO:unoserver:Starting unoserver. INFO:unoserver:Command: libreoffice --headless --invisible --nocrashreport --nodefault --nologo --nofirststartwizard --norestore -env:UserInstallation=file:///tmp/tmp9n0aw9aj --accept=socket,host=127.0.0.1,port=2001,tcpNoDelay=1;urp;StarOffice.ComponentContext
^You can see I'm using different ports - 2000 and 2001
How to go about parallelizing unoserver conversions?
dev environment: AWS Ubuntu instance, Python 3
Thanks
The text was updated successfully, but these errors were encountered: