-
-
Notifications
You must be signed in to change notification settings - Fork 43
ConnectionRefused on first attempt at exporting image #164
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
Comments
I've seen this behaviour enough times for it to become very annoying, I would appreciate a robust retry policy. Thanks. PS: running orca on Windows 7, through Git bash or cmd. |
Thanks for letting us know. What's happening here is that plotly.py launches orca as a server process the first time you export an image. It does have a robust retry policy for communicating with the server, it just currently gives up after 8 seconds 🙂 This number is admittedly a bit arbitrary, and it sounds like we should increase it. I've opened a plotly.py issue for this at plotly/plotly.py#1297. In the meantime, here's a workaround. You can ask plotly.py to start the orca process manually (before you call import plotly
import time
plotly.io.orca.ensure_server()
time.sleep(10) This will give the server an extra 10 seconds to startup (in addition to the 8 seconds that I'm going to close this issue in favor of plotly/plotly.py#1297 since this is a plotly.py, not orca, issue. Thanks! |
I'm running orca in a miniconda container, which is in turn running as a celery service (though probably not relevant).
On the first one or two attempts at generating an image (when kicking off at about the same time, but on separate processes), I get connection refused. On subsequent tries, it works fine, everytime.
At a guess, I suspect the python client isn't waiting long enough for orca to start, but makes it through on a warm restart when orca starts a bit quicker?
The text was updated successfully, but these errors were encountered: