Streamlit server 1.5.1 from command line, hard to stop with CTRL C


Well, the title of this post almost says it all. When running streamlit from the command line, you should be able to stop it by pressing CTRL C. Yesterday I was using V 0.84 and this would stop almost immediately when pressing CTRL C. Today, I upgraded to Streamlit 1.5.1 and the server is almost ‘unstoppable’.
I close the app in the browser, go back to the Streamlit command line, press CTRL C multiple times and it does not stop. Sometimes, if I then leave it alone and check back later after 10 or 15 minutes, I notice that it has stopped finally.
Is there some kind of internal time-out that can be set shorter?

I now close the command line window entirely, but then I have to relaunch that, activate my Conda env again, etc. Bit of a nuisance …

PS. The delay seems to be considerably shorter when I leave the app open in the browser.

While I can’t rule out there is a difference between Streamlit versions, it’s important to note that hitting Ctrl-C in the terminal sends an interrupt signal to the process. What the operating system decides to do with the signal can often be a bit mysterious.

1 Like

Hi Randy
I noticed that the delay in the server being stopped can be considerable, but mainly when the app is killed (browser tab is closed) and the server is left running.
If CTRL C is hit when the app is still running in the browser, the delay is much shorter and in fact acceptable.
If this is taken into account, there is not a real problem.