Streamlit session (connection) keep alive longer for mobile devices

Hello,
we are developing a streamlit service that is hosted and is working great at the moment

streamlit works on webSockets so on mobile if you minimize the browser the open site socket will be frozen, witch causes the page to force a reload after a certain time, witch results in a session restart .

I am looking into changing the timeout to 10minuts ±, this is the first time i am developing with streamlit whats the best approach here, is there a setting in the toml file that can handle this?

i dont want to get messy, so iam open for ideas, maby i need to save the sesssion and then with a cookie to load back into it?

found it, disconnectedSessionTTL = 300 in the .toml

thanks

1 Like