I have a panel/bokeh server application embedded in a Flask/gunicorn server, and it works well.
The issue I am currently trying to address is slow-ish startup times of a client session when used on a high-dimensional problem, which, by extension, means many plots and widgets in the interactive web page.
One approach I have investigated to lessen the startup time is to set the dynamic property of the panel Tabs equal to True, i.e.
pn.Tabs(..., dynamic=True)
In so doing, the application crashes with the resulting stack trace below. I am running with bokeh 2.0.2 and panel 0.9.5.
Traceback (most recent call last):
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/tornado/web.py", line 1703, in _execute
result = await result
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/server/views/autoload_js_handler.py", line 60, in get
session = await self.get_session()
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/server/views/session_handler.py", line 120, in get_session
session = await self.application_context.create_session_if_needed(session_id, self.request, token)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/server/contexts.py", line 218, in create_session_if_needed
self._application.initialize_document(doc)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/application/application.py", line 171, in initialize_document
h.modify_document(doc)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/application/handlers/function.py", line 132, in modify_document
self._func(doc)
File "/Users/x/Desktop/x/x_server.py", line 306, in bk_app
w_per_ui=_w_per_ui, num_col=_num_col)
File "/Users/x/Desktop/x/session/session.py", line 230, in go
pn.Column(*_ll).server_doc(D)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/viewable.py", line 706, in server_doc
model = self.get_root(doc)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/viewable.py", line 643, in get_root
self._preprocess(root)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/viewable.py", line 410, in _preprocess
hook(self, root)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/links.py", line 87, in _process_callbacks
linkable = root_view.select(Viewable)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/layout.py", line 148, in select
objects += obj.select(selector)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/layout.py", line 148, in select
objects += obj.select(selector)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/panel/layout.py", line 148, in select
objects += obj.select(selector)
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/core/query.py", line 88, in <genexpr>
return (obj for obj in objs if match(obj, selector, context))
File "/Users/x/opt/anaconda3/envs/x/lib/python3.7/site-packages/bokeh/core/query.py", line 160, in match
for key, val in selector.items():
AttributeError: type object 'Viewable' has no attribute 'items'