Deploy app error: connection refused by peer

Hi,
I tried to deploy my app today, which works fine on my local laptop, and got the following error:

[manager] The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/healthz”: read tcp 127.0.0.1:51382->127.0.0.1:8501: read: connection reset by peer
[manager] Streamlit server consistently failed status checks
[manager] Please fix the errors, push an update to the git repo, or reboot the app.

Any idea what this means or how to fix it? File size? Firewalls? Something else?? The filesize is large but under the 800Mb limit, so it should work.
Any help would be appreciated.
Thanks.