Download file size limit

I am trying to download large file using FileDownload widget. It seems that the file size limit on my setup (Bokeh server 3.6.0 (running on Tornado 6.4.1), Panel 1.5.3, browser Microsoft Edge) is about 350 MB. The example below work for FILE_SIZE_MB=300 but fails with FILE_SIZE_MB=400. Is there any way to increase this limit?

Error message:

import logging
import os
import panel
from io import BytesIO
from logging import DEBUG

logging.basicConfig(level=DEBUG)

FILE_SIZE_MB = 400 #300 works, 400 fails
def create_file():
    byte_io = BytesIO()
    byte_io.write(os.urandom(FILE_SIZE_MB * 1024 * 1024))
    byte_io.seek(0)
    return byte_io

download_btn = panel.widgets.FileDownload(filename='large_file.txt', callback=create_file, embed=False, button_type='success')

MAX_SIZE_MB = 1000
server_settings = {
    'websocket_max_message_size':MAX_SIZE_MB*1024*1024,
    'http_server_kwargs':{'max_buffer_size': MAX_SIZE_MB*1024*1024}
} #this settings doesn't seem to have any effect

panel.serve(download_btn, verbose=True, **server_settings)