-
Notifications
You must be signed in to change notification settings - Fork 505
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
Voila process is leaking threads #896
Comments
Debugging this a bit, it seems these threads are client channels that might not be disposed of properly, below is the output of
|
@roman-kouzmenko I think you're right in that these are client channels not getting cleaned up. This problem of leaking threads was pointed out to me this morning, and I spent some time today trying to track this down as well. It seems two threads get created here: Line 166 in da39b76
Although I think these stick around for the app's entire lifecycle, and so are not a problem. Three threads seem to get added each time the notebook is accessed here though, and these don't seem to be cleaned up: Line 179 in da39b76
I'm going to keep looking, but any help from someone more familiar with the codebase would be much appreciated. |
FYI, I mitigated the leak on kubernetes by:
|
We are running Voila app with dokku. The CPUs are keeping eating up by Voila. We have to restart our dokku server every few days. I believe it is caused by this problem. Could anyone fix this issue? Thanks. |
This is a longstanding issue, see the very related issues There starts to be some work on it, though, see PRs linked in #849 (comment) |
I would like to report the same issue. The only solution for us is currently to restart the docker container, but we are now at the point where we need to do it twice a day :-( I wanted to inquire if there is any work being done to address this issue, and if you already have a timeline for solving the issue: we are relying on voila a lot, but this issue is making our service unreliable and we might need to change technology. (I hope this is not needed, as we like a lot the work being done on voila! :-) ) |
Just a quick thought here - I wonder why this is not something that the Voila Gallery has run into: https://voila-gallery.org/ (repo here: https://github.com/voila-gallery/gallery) That is (I believe) a persistent JupyterHub serving Voila dashboards via Jupyter servers. If they are not running into this "runaway threads" issue, then perhaps there is a workaround? I guess another question is whether this is an issue with Voila itself, or dependent on something deeper in Jupyter machinery. edit: ahh I might be mistaken, I think the voila gallery may use BinderHub, in which case it's probably shutting down the whole pod after inactivity |
Voila can be runned in two way. One is from the Jupyter server extension by calling "/voila/render/" in the URL. In the dokku |
Interesting - so this doesn't occur when running Voila via an already-running Jupyter Server, but it does occur when you run it via the command line? |
I am not sure about the voila Jupyter server extension. But I am calling the server extension a lot everyday and I did not experience any CPU overload related to voila. Our dokku apps problem is definitely from the voila program, since we |
Yes that's right. It used to be a JupyterHub running on a single instance, but switched to using BinderHub as a backend so the gallery can be deployed as a static site on GitHub Pages: voila-dashboards/tljh-voila-gallery#83 |
Hopefully this is fixed now in Voila 0.2.14. Feel free to re-open the issue if you can still reproduce. |
Do you have kernel culling enabled? If so what is your culling config? |
Here is my voila configuration: { |
Would setting |
It's definitely possible we missed another issue on Voila though. |
Each time a notebook is accessed, voila is adding 3 threads that don't go away even as kernels are culled, eventually depleting all server resources.
Is anyone observing the same / has a fix?
The text was updated successfully, but these errors were encountered: