Connection timed out

When accessing my Streamlit app, via a Satellite Internet connection, I get “Please wait” then, after a while, a popup saying “Connection Error” - “Connection times out”. I do NOT have any issues connecting to and using this application via other forms internet access. And my co-workers can access it without issue.

  • Note that this Steamlit app is running in a container in a GCP VM inside our VPN.
  • I tried the solutions provided at Symptom #2: The app says “Please wait…” forever to no avail.
  • I also output all the streamlit configs but am unable to find any type of ‘timeout’ params etc.
  • I am guessing this has something to do with the high latency of Satellite internet.
  • Streamlit version=0.62.1

Any help with this will be greatly appreciated. Thanks.

Hi @dplutchok -

This sort of sounds like what this issue is describing:

Not sure if there are any other specifics that @karriebear might need, but she might be able to work with you to solve your solution and inform the larger solution.

Best,
Randy

Hi @dplutchok! I remember seeing a similar issue that was related to websocket compression. In my case I had a reverse proxy that was stripping out some headers on the requests to and responses from the Streamlit app, and it broke the websocket compression feature. I would see the browser repeatedly trying to connect to the Streamlit server using the developer tools in my browser, and eventually timing out.

To check if you are running into the same issue, you can try setting the server.enableWebsocketCompression config flag to false in your Streamlit app’s config file, or set the STREAMLIT_SERVER_ENABLE_WEBSOCKET_COMPRESSION environment to "false". See docs for more info on config options.

Cheers,
Amey

1 Like

I already tried the solutions in the documentation including adding --server.enableCORS=false to my usual streamlit run command and also --server.enableCORS=false but neither of these made any difference. Should I try something else?

Do you know if there is any type of timeout configuration that can be set on the server.