Protocol Error: Token is expired

I am running bokeh server on a linux virtual server. The command line syntax for starting is ( I have abstracted some of the exact paths and URLs)

python bokeh serve --port 5006 application_dir/application --num-procs 0 --use-xheaders --session-token-expiration=900000

With multiple users reporting 502 errors and on the server I see this:

HTTPServerRequest(protocol='https', host='', method='GET', uri='/camera_etc/ws', version='HTTP/1.1', remote_ip='')
Traceback (most recent call last):
  File "/home/tumlinson/anaconda3/lib/python3.9/site-packages/tornado/", line 954, in _accept_connection
    open_result =*handler.open_args, **handler.open_kwargs)
  File "/home/tumlinson/anaconda3/lib/python3.9/site-packages/tornado/", line 3173, in wrapper
    return method(self, *args, **kwargs)
  File "/home/tumlinson/anaconda3/lib/python3.9/site-packages/bokeh/server/views/", line 149, in open
    raise ProtocolError("Token is expired.")

Previous queries about this have suggested the argument --session-token-expiration=900000 but these token expirations are occurring even with that included. When these occur, my users are not able to access the online tools even after clearing local caches, etc. so this error essentially makes my service unusable. I am looking for tests to perform or diagnostics that will help with this. Thanks.

You can see where the token expiry generation happens here:

and the expiry comparison happens here:

The datetimes on both sides are UTC so there should not be any timezone issues. I am afraid there is not much to go on here. Do you have a proxy or other caching layer in between that could be affecting thigns?