Well this is strange because the standard value is already 20 MB.
See help text if you write bokeh serve --help:
--websocket-max-message-size BYTES
Set the Tornado websocket_max_message_size value (default: 20MB)
And my experience is that 9 Mo (≈ 9 MB) should work.
Your problem may have something to do with OpenShift.
To test if your problem is due to Bokeh, try to run following code directly (not on OpenShift):
from bokeh.io import curdoc
from bokeh.models import FileInput
file_input = FileInput(width=600)
def file_callback(attr, old, new):
print(f"-> New file loaded, beginning with: {new[:20]}...")
file_input.on_change('value', file_callback)
curdoc().add_root(file_input)
Run with: bokeh serve --show file_name.py
Then try to upload a file. You will see in the logs if it works or not.
Increasing the file size, you will see that somewhere between 10 and 20 MB this doesn’t work anymore, the message WebSocket connection closed: code=None, reason=None is shown.
Then, using the option “–websocket-max-message-size 1000000000”, files of more than 100 MB should be loadable.
Also, I think I didn’t right understand how you really try to catch the file in your code.
You say in the text that you use FileInput model but in your code I only see a Div and a Button but no FileInput.
For further help, please provide a minimal reproducible example.