☰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

Can't find setter for on_server_unloaded()

Community Supportserverbokeh
jokeh_with_bokeh
jokeh_with_bokeh

I am trying to create a Bokeh application as a subprocess and I am trying to have logs for when a session and server are shutdown.

I found within the Document class that there is a setter for on_session_destroyed which is session_destroyed_callback(). But I can’t find one corresponding to the server.

⌁   Link to post
Bryan
Bryan

on_server_unloaded is not part of the Document API. You would need to use the general app_hooks.py mechanism as described in the documentation, in order to define that hook:[1]

https://docs.bokeh.org/en/latest/docs/user_guide/server/app.html#lifecycle-hooks


  1. If you are using the Bokeh server programmatically, it’s also possible to subclass and add a custom lifecycle handler to the application, but I will assume that uncommon case is not the case here. ↩︎

⌁   Link to post

End of archived discussion · Replies are disabled