This is basically the same topic as this: Bokeh 2.0 websockets, which has since been closed.
In short, we’ve found its common for our users to leave a Bokeh application idling, come back to it later, and find a dead page. The page is dead because the websocket as been lost, and bokeh fails to reconnect. Yet there is no indication to users that the connection lost, so it’s not immediately clear to them that they should just reload the page.
In the previous topic, @p-himik mentions:
I would probably intercept all Bokeh log messages and look out for the messages that start with “Lost websocket”.
Here is the log message I think I need to intercept: bokeh/connection.ts at branch-3.0 · bokeh/bokeh · GitHub
But from what I can tell, the
Logger class stores a reference to
logger.info (I’d add a link, but new users can only include 2 links in posts…)
So I can’t simply patch
Logger class already referenced the original
Does that make sense?
Is there some other way to intercept these messages? Or perhaps there’s a new, better way to handle lost connections since that topic?
Thanks in advance,