☰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

delete all main objects on websocket connection closed

Community Support
aliounis
aliounis

Hi all,

I am running a bokeh server (using the directory format) where the main application creates a TCP connection to a real time data stream and the plots the data as it comes in. Everything is running smoothly in general, when a user creates a websocket connection to the application a new TCP connection is created and the data begins plotting, however, things are never cleaned up when a user disconnects from the websocket. This is leaving a whole bunch of zombie TCP connections that are still receiving data uselessly.

I’m just wondering if there is a way to easily delete all the objects in main when the instance they belong to is diconnected. Now, I could probably do this using the server_lifecycle hooks but I feel like there needs to be an easier way. Does any one else have experience with this?

⌁   Link to post

End of archived discussion · Replies are disabled