The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/script-health-check": dial tcp 10.13.98.118:8501: connect: connection refused

i keep getting this error

2024-01-10 00:15:15.857 503 GET /script-health-check (10.13.98.118) 60090.74ms
[00:15:21] ❗️ The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/script-health-check": dial tcp 10.13.98.118:8501: connect: connection refused
[00:16:51] ❗️ Streamlit server consistently failed status checks

[00:16:51] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

here’s my app link:https://closed-fack3wu4jf3dzyzrmevyrh.streamlit.app/
my github repo link:GitHub - vpriyathegreat/closed

i tried rebooting it multiple times but still the app crashes, the app works fine when i dont include the mlp classifier part but the moment i add that model, it crashes. can someone pls help me out with it?been stuck over it for hrs now.

Hey @VISHNUPRIYA_S_RA2111,

Did you end up deleting your app? I’m looking into this but not seeing that an app exists at that web address

Hi,
I had the same problem.
In my main script I used st.stop() function. It was called when no input was provided. I changed it to a return statement and the issue is gone.
I guess the health-checker doesn’t expect st.stop().

Hope that helps.