-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service large amount of data results in timeout and app non response #140
Comments
I guess what we really need is server-based paging of large dataframes like we can do in Dash. Could implement ourserlves I guessif we can catch some of the events, like sort on a dataframe |
I don't know pretty well the architecture. I think the websocket link timeout is 20 seconds on uvicorn. This setting is not editable in the current implementation. You may try temporarily to modify the line 404 of uvicorn.run(asgi_app, host=host,
port=port, log_level=log_level, ws_max_size=MAX_WEBSOCKET_MESSAGE_SIZE, ws_ping_timeout=600) Could you share more details about the volume your application is trying to fetch using the browser inspector ?
|
Did you try to bind visibility on a variable in the state and keep the state empty till the visibility variable is triggerd on the backend ? def handle_timer_tick(state: StreamsyncState):
if state['tick_visible'] is False:
return
df = state["random_df"]
for i in range(5):
df[f'pgcf_{i+1}'] = np.around(np.random.rand(10, 1), decimals=9)
state["random_df"] = df
def trigger_auto_refresh(state: StreamsyncState):
state["tick_visible"] = not state["tick_visible"] |
Yeah, I'll consider doing this to create the data until requested. Will also look at the messages as you suggested above |
I have described a design to chunk frame inside the websocket payload. It will ensure we keep the frame below a size and highly reduce the risk of timeout : FabienArcellier#12 It involves adding an encoder / decoder on backend / frontend to rebuild the frame. |
I am trying to serve quite a bit of information but get timeouts as shown below and app becomes unresponsive
I tried to make some of the data invisible, since it is not needed until user wants to see it, but that does not help.
Any ideas on how to avoid this timeout? Or can we extend the teimeout somewhere in the settings>
The text was updated successfully, but these errors were encountered: