Uploading version when there are no users

Iā€™m running a local served streamlit application currently used by a few users.

The users interact with the app sending an audio stream (webrtc) or a file. Then that audio is processed and return some values. The whole process could be long, at the streaming user could be sending audio for an hour, for example.

My question is how can I safely stop the application to upgrade it to the next version. I donā€™t want to stop it in the middle of a stream or while the user is looking at the results.

I know streamlit keeps a web socket connected with the browser so I thought wonā€™t be difficult to track how many connections are currently established and wait till they are gone, but seems to be more complex than expected.

I can rely on ā€œss -antpā€ but donā€™t seem to be the best option.
I also checked if tracing in nginx or caddy could help, but it didnā€™t trace the web sockets (or I canā€™t found it).

I have seen in the forum some hacks to get the all the sessions but I want to ask before going that path, as the ability to change the version without impacting looks something many people could want.

Thanks!

Hi @adrianlzt

An easy way to see how many user connections there are for our app is to click on the ā€œManager appā€ found at the bottom right of our app (see screenshot below):

You can also see this graphically by using the ā€œAnalyticsā€ feature in the ā€œManage Appsā€ menu:

Hereā€™s the screenshot of our app user analytics:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.