bokeh icon indicating copy to clipboard operation
bokeh copied to clipboard

Bokeh server is too verbose in development mode

Open mattpap opened this issue 5 years ago • 1 comments

For example:

$ BOKEH_DEV=true BOKEH_RESOURCES=server-dev bokeh serve --port=5007 examples/bugs/issue11033.py 
2021-03-17 13:33:03,665 Starting Bokeh server version 2.3.0-21-g79d8b9d69 (running on Tornado 6.1)
2021-03-17 13:33:03,667 User authentication hooks NOT provided (default user enabled)
2021-03-17 13:33:03,667 These host origins can connect to the websocket: ['localhost:5007']
2021-03-17 13:33:03,667 Patterns are:
2021-03-17 13:33:03,668   [('/issue11033/?',
2021-03-17 13:33:03,668     <class 'bokeh.server.views.doc_handler.DocHandler'>,
2021-03-17 13:33:03,669     {'application_context': <bokeh.server.contexts.ApplicationContext object at 0x7fca535a7d30>,
2021-03-17 13:33:03,669      'bokeh_websocket_path': '/issue11033/ws'}),
2021-03-17 13:33:03,669    ('/issue11033/ws',
2021-03-17 13:33:03,669     <class 'bokeh.server.views.ws.WSHandler'>,
2021-03-17 13:33:03,670     {'application_context': <bokeh.server.contexts.ApplicationContext object at 0x7fca535a7d30>,
2021-03-17 13:33:03,670      'bokeh_websocket_path': '/issue11033/ws',
2021-03-17 13:33:03,670      'compression_level': None,
2021-03-17 13:33:03,670      'mem_level': None}),
2021-03-17 13:33:03,670    ('/issue11033/metadata',
2021-03-17 13:33:03,671     <class 'bokeh.server.views.metadata_handler.MetadataHandler'>,
2021-03-17 13:33:03,671     {'application_context': <bokeh.server.contexts.ApplicationContext object at 0x7fca535a7d30>,
2021-03-17 13:33:03,671      'bokeh_websocket_path': '/issue11033/ws'}),
2021-03-17 13:33:03,671    ('/issue11033/autoload.js',
2021-03-17 13:33:03,671     <class 'bokeh.server.views.autoload_js_handler.AutoloadJsHandler'>,
2021-03-17 13:33:03,672     {'application_context': <bokeh.server.contexts.ApplicationContext object at 0x7fca535a7d30>,
2021-03-17 13:33:03,672      'bokeh_websocket_path': '/issue11033/ws'}),
2021-03-17 13:33:03,672    ('/?',
2021-03-17 13:33:03,672     <class 'bokeh.server.views.root_handler.RootHandler'>,
2021-03-17 13:33:03,672     {'applications': {'/issue11033': <bokeh.server.contexts.ApplicationContext object at 0x7fca535a7d30>},
2021-03-17 13:33:03,673      'index': None,
2021-03-17 13:33:03,673      'prefix': '',
2021-03-17 13:33:03,673      'use_redirect': True}),
2021-03-17 13:33:03,673    ('/static/extensions/(.*)',
2021-03-17 13:33:03,674     <class 'bokeh.server.views.multi_root_static_handler.MultiRootStaticHandler'>,
2021-03-17 13:33:03,674     {'root': {}}),
2021-03-17 13:33:03,674    ('/static/(.*)',
2021-03-17 13:33:03,674     <class 'bokeh.server.views.static_handler.StaticHandler'>)]
2021-03-17 13:33:03,677 Bokeh app running at: http://localhost:5007/issue11033
2021-03-17 13:33:03,677 Starting Bokeh server with process id: 602392
2021-03-17 13:33:10,336 Subprotocol header received
2021-03-17 13:33:10,337 WebSocket connection opened
2021-03-17 13:33:10,338 Receiver created for Protocol()
2021-03-17 13:33:10,339 ProtocolHandler created for Protocol()
2021-03-17 13:33:10,339 ServerConnection created
2021-03-17 13:33:10,343 Sending pull-doc-reply from session '6yz5iOHA0V8VEC4GjDzbVId62yhlkVwQK38mRkAS5aza'
2021-03-17 13:33:11,992 WebSocket connection closed: code=1001, reason=None
2021-03-17 13:33:12,414 Subprotocol header received
2021-03-17 13:33:12,415 WebSocket connection opened
2021-03-17 13:33:12,423 Receiver created for Protocol()
2021-03-17 13:33:12,423 ProtocolHandler created for Protocol()
2021-03-17 13:33:12,423 ServerConnection created
2021-03-17 13:33:12,441 Sending pull-doc-reply from session 'kxy050tObd8lW4A7lHxM502Rhcu3QFHJqFTOz6lJPB7r'
2021-03-17 13:33:18,684 [pid 602392] 1 clients connected
2021-03-17 13:33:18,684 [pid 602392]   /issue11033 has 2 sessions with 1 unused
2021-03-17 13:33:33,689 [pid 602392] 1 clients connected
2021-03-17 13:33:33,690 [pid 602392]   /issue11033 has 2 sessions with 1 unused
2021-03-17 13:33:37,684 Scheduling 1 sessions to discard
2021-03-17 13:33:37,684 Discarding session '6yz5iOHA0V8VEC4GjDzbVId62yhlkVwQK38mRkAS5aza' last in use 25691.255631029606 milliseconds ago
2021-03-17 13:33:37,686 Deleting 1 modules for <bokeh.document.document.Document object at 0x7fca535963a0>
2021-03-17 13:33:48,687 [pid 602392] 1 clients connected
2021-03-17 13:33:48,687 [pid 602392]   /issue11033 has 1 sessions with 0 unused
2021-03-17 13:34:03,687 [pid 602392] 1 clients connected
2021-03-17 13:34:03,687 [pid 602392]   /issue11033 has 1 sessions with 0 unused
2021-03-17 13:34:18,680 [pid 602392] 1 clients connected
2021-03-17 13:34:18,680 [pid 602392]   /issue11033 has 1 sessions with 0 unused
2021-03-17 13:34:33,683 [pid 602392] 1 clients connected
2021-03-17 13:34:33,683 [pid 602392]   /issue11033 has 1 sessions with 0 unused

And this goes on.

mattpap avatar Mar 17 '21 13:03 mattpap

What can be improved:

  • we need more granular verboseness, e.g. websocket tracing is only useful if debugging websockets
  • information should be printed on change, not on schedule
  • routing patterns should be formatted in a readable and concise way

mattpap avatar Mar 17 '21 13:03 mattpap