[Issue] Deployed app does not create separate thread for separate users

Hey everyone! :slight_smile:

I have created a Streamlit app which was deployed by my company on EC2, and we use it mostly for automating data analysis processes. Tmux is used for keeping the app running.

I have used hack for session handling and so far it works fine. However, I’ve noticed a strange thing - even though multiple users have independent sessions, if one user triggers some background function (which takes e.g. 30 seconds to execute), other users must await the execution before they too can trigger that or some other background function. So, it is possible for multiple users to open the app at the same time, but the execution of background functions across multiple users is sequential.

I thought that the Tornado handles multiple users connections on its own. Is there any hack to make multiple sessions completely independent so that users don’t have to await their turn for actually using the app (or maybe is it some common problem which arises from the way people write Streamlit code)?

Thanks in advance!

Streamlit Version
0.82.0

Port
8501

Python Version
3.8

Cloud Service
Amazon EC2, T3 Medium Instance

Is the code available publicly
No