Repository navigation
Start bokeh app to activate bokeh's clean session callbacks. - #6728
Conversation
|
Can one of the admins verify this patch? |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files ±0 15 suites ±0 6h 28m 13s ⏱️ - 7m 22s For more details on these failures, see this check. Results for commit 5d1f48d. ± Comparison against base commit fae6a21. ♻️ This comment has been updated with latest results. |
|
The bokeh server is not something I'm familiar with, @jsignell are you? |
|
Thank you for this @z4m0! I gave this a spin, and indeed this fixes the "un-cleaned bokeh session" issue. This has cropped up a number of times, and is definitely a nasty failure mode, so kudos on finding the solution. For folks wanting an easy reproducer, here is what I did to test this:
for i in {1..100}
do
curl -X GET -L -v 127.0.0.1:8787
done
I think this PR is a huge improvement already, but a couple of suggestions:
I don't love the above snippet, so perhaps there are other suggestions people have. |
…to 6694-bokeh-app-start
|
@jacobtomlinson You know your way around the dashboard, any suggestions for point 2) in Ian's comment #6728 (comment) ? |
|
@ian-r-rose I could validate number 1. Indeed sessions were accumulating as well. However for 2 I could not see any zombie task. Is there a way to reproduce this behaviour? PD Sorry I messed the commit history of the PR. :( |
I'll see if I can come up with something -- I haven't seen it myself, I just have the generalized feeling that if we start a forever callback, as responsible users we should also stop it when done with it :) |
jacobtomlinson
left a comment
There was a problem hiding this comment.
This seems great! Thanks for the efforts here.
I don't have any useful ideas around when to stop the server though. @ian-r-rose your snippet seems reasonable.
|
Update here: I did confirm that the various bokeh periodic callbacks keep on going forever after calling def stop_services():
for application in self.http_application.applications:
if hasattr(application, "stop") and callable(application.stop):
application.stop()
for service in self.services.values():
service.stop() |
…to 6694-bokeh-app-start
…plication.start()
| ) | ||
|
|
||
| def stop_services(self): | ||
| if hasattr(self, "http_application"): |
There was a problem hiding this comment.
This is an unfortunately verbose check, but I still don't see a substantially cleaner way to do it.
There was a problem hiding this comment.
Yes it is but without that the test_worker_port_range was failing.
jacobtomlinson
left a comment
There was a problem hiding this comment.
Looks like the linter isn't happy. Could you fix this up, here are the docs on how to configure the linters to run on each commit. You'll likely need to run precommit install and precommit run --all-files.
Ok it was fixed by #6779. Now the linter passes. The failing tests were passing in the last run though... |
|
@z4m0 thanks! That's fine, there is some known CI instability here currently, the failures don't look related to this change. |
|
Thank you @z4m0 ! |
Closes #6694
pre-commit run --all-files