# Run time error for huggingface space

**URL:** <https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090>\
**Category:** Spaces\
**Created:** [February 23, 2022, 10:34pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090 "2022-02-23T22:34:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruhwang2001](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@ruhwang2001](https://discuss.huggingface.co/u/ruhwang2001)\
**Post date:** [February 23, 2022, 10:34pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/1 "2022-02-23T22:34:22Z")

</div>

Hi, I’m trying to deploy a gradio image recognition app on huggingface space. After the app starts building, it works, but after a while, there is a run time error, and the error message in the “see logs” says,  
“Running on local URL: [http://localhost:7860/](http://localhost:7860/)  
\*\*\* Failed to connect to ec2.gradio.app:22: [Errno 110] Connection timed out”  
I have no idea why it is the case and why it is running on local url instead of the public space. The app only works if I restart the space or edit a file.  
One thing to add though is that I have a deep learning model (a large file, between 95-100 MB, ending in .pkl) under the “files and versions section” which I uploaded from my laptop. Could this be the reason why the app fails after some time? How do I make the app run permanently?  
My url is: [https://hf.space/gradioiframe/ruhwang2001/wonder-app/+/api/predict/](https://hf.space/gradioiframe/ruhwang2001/wonder-app/+/api/predict/)

---

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [February 24, 2022, 9:32am UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/2 "2022-02-24T09:32:21Z")

</div>

cc @cbensimon

---

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [February 24, 2022, 2:59pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/3 "2022-02-24T14:59:39Z")

</div>

Hey there! This is because you set `share=True` in `interface.launch`. You can remove that parameter.

---

<div class="post-metadata">

**Author:** ![fschwartzer](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fschwartzer](https://discuss.huggingface.co/u/fschwartzer)\
**Post date:** [March 1, 2022, 3:43pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/4 "2022-03-01T15:43:56Z")

</div>

Hi! The same for me! When removing the parameter, the output is not displayed!

---

<div class="post-metadata">

**Author:** ![Filmmaker1990](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@Filmmaker1990](https://discuss.huggingface.co/u/Filmmaker1990)\
**Post date:** [September 5, 2024, 8:40pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/5 "2024-09-05T20:40:16Z")

</div>

the same happens to me when I try to use animatemagic.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 5, 2024, 10:41pm UTC](https://discuss.huggingface.co/t/run-time-error-for-huggingface-space/15090/6 "2024-09-05T22:41:46Z")

</div>

Probably same here.

> **[John6666/blue-real-xl-v10-sdxl · connection errored out](https://huggingface.co/John6666/blue-real-xl-v10-sdxl/discussions/1#66da0ffd3211d62230fe877b)**
>
> i have connection errored out each time i submit prompt whereas i don't have this issue when using other model. I tried to restart space many times but still doesn't work.

P.S.

> **[@John6666 on Hugging Face: "@victor Sorry for the repetitiveness.

I'm not...](https://huggingface.co/posts/John6666/191046582909567#66da54a46ef25234630e9580)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> Setting fastapi==0.112.2 in requirements has helped me as a temporary fix.
