-
Notifications
You must be signed in to change notification settings - Fork 93
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
Error rendering Python plots in a loop (RPC timed out after 30 seconds) #5954
Comments
@loafing-cat I see that you are creating plots in a loop; can you create one single plot without error? Is it possible that the loop takes more than 30 sec to run? Can you create a reproducible example with code we can run that generates this error? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Here is a smaller example demonstrating the problem (I am going to hide the previous comments for ease of reading): import numpy as np
import pandas as pd
import time
df = pd.DataFrame(np.random.randint(1, 7, 6000), columns=['one'])
df['two'] = df['one'] + np.random.randint(1, 7, 6000)
for x in range(7, 12):
df.plot.hist(bins=x, alpha=0.5)
time.sleep(10) Each of the plots individually can be created very quickly, but when they are in a loop, we get an RPC time out because the whole Doing something like this also gets us an RPC timeout if you select both lines and execute at once, but I think this is the same as #1762 i.e. we should break up this code and execute the statements one at a time: df.plot.hist(bins=10, alpha=0.5)
time.sleep(40) I don't believe that #1762 fully covers the specific situation here, as breaking up statements and running them individually won't help us with the |
We could adjust the plots service so it does not try to render a plot when the runtime is busy. |
Note to uncomment test step in "R - Verifies basic plot functionality" when this is resolved. At the moment, when this happens, the comparison of the master image against the current plot image fails (the sizing really is slightly off). |
Originally posted by @loafing-cat in #5020
The text was updated successfully, but these errors were encountered: