☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Keep blocking task alive after session expires

Community Support
Maxxner
Maxxner

I have a use case that allows the user to trigger a blocking task on the server side (via a button click). However this blocking task may run up to a few days. Obviously the browser will not be open for such a long period which eventually destroys the session. Is there a possibility to allow the blocking task to finish without being killed in the meantime?

⌁   Link to post
Bryan
Bryan

You can execute arbitrary Python code, so most anything is possible. But as always, things come down to details. You can execute the long task in a separate process, or (if you only have one Bokeh server and expect it to stay running) in a separate thread. It might be more robust to have a separate service behind a REST API though. Beyond that, more details are needed to offer guidance about “re-connecting”. Is there just one user and session at a time? Many users and one session to view? Many users all with their own sessions? Can you tolerate having a special URL to return to (e.g. with a URL arguments in it)?

⌁   Link to post

End of archived discussion · Replies are disabled