Skip to content
Streamlit User Instance Length
helpmeguys
OP

a year ago

I have a small search app that users can access but often the Streamlit app user instance will reset while in use most likely due to inactivity for 30-60 seconds or so. Can the user instance alive time be adjusted?

$10 Bounty

5 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


a year ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody โ€ข over 1 year ago


clashing

a year ago

By any chance, have you made your deployed service serverless?

That setting should be turned off to keep the connection alive and not let your service sleep after some inactivity


helpmeguys
OP

a year ago

Serverless is not enabled; again, the problem is related to individual user sessions and not the app as a whole.


helpmeguys
OP

a year ago

Found the solution by adding a couple commands at start _ Streamlit run my_app.py --server.port $PORT --server.websocketPingInterval=25 --server.enableWebsocketCompression=false


helpmeguys

Found the solution by adding a couple commands at start \_ Streamlit run my\_[app.py](http://app.py) \--server.port $PORT --server.websocketPingInterval=25 --server.enableWebsocketCompression=false

clashing

a year ago

Great! Congrats on clearing the issue


Welcome!

Sign in to your Railway account to join the conversation.

Loading...