# Runtime Error in Paid Space after upgrade and no info

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%3E%5C
**Category:** Spaces\
**Created:** [May 24, 2024, 3:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288 "2024-05-24T15:04:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F1 "2024-05-24T15:04:08Z")

</div>

Hi,

We have this space with a gradio app that was running perfectly last week with the free plan:

> **[Olas Prediction Live Dashboard - a Hugging Face Space by valory](https://huggingface.co/spaces/valory/olas-prediction-live-dashboard)**
>
> Discover amazing ML apps made by the community

And since monday this week we got a Runtime Error saying:

```auto
# Runtime error
## Memory limit exceeded (16Gi)

```

The build logs were fine and the errors comes with the start up of the container. We decided to go for a paid version and after updating the error we have now is:

```auto
# Runtime error
## Memory limit exceeded (32Gi)

```

Please someone from infra, could you give us more information about what is going on here and how to solve this? We need to present a poster in a conference next week where we want to share this dashboard. @radames @michellehbn

Many thanks

Rosa  
P.S.: I checked the forum and it was not helpful any similar posts since we have no info about the problem.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 24, 2024, 3:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F2 "2024-05-24T15:10:04Z")

</div>

hi @cyberosa, could you trace your app memory footprint? perhaps running it locally to see if it’s not growing about the Space hardware limit?

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F3 "2024-05-24T15:11:42Z")

</div>

Hi @radames ,

The app is working perfectly fine locally so we cannot reproduce the issue. Do you have any other logs of the container that could give us info why the app is working locally but not working in HF?

Best

P.S.: My local machine is a Mac-Pro M3 with 18 Gb RAM and I monitored the execution and could not detect any error.

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F4 "2024-05-24T15:16:08Z")

</div>

Trying to restart the space again…

![Screenshot 2024-05-24 at 17.15.23](https://us1.discourse-cdn.com/hellohellohello/original/3X/d/7/d727b12ae7975fe4f9b74c8a8541cc0e14143956.png)

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F5 "2024-05-24T15:18:42Z")

</div>

Ok it did not work ☹ Could someone increase the verbose of the docker logs so that I can get more information?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 24, 2024, 3:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F6 "2024-05-24T15:19:59Z")

</div>

I recommend you logging the memory on your app and see the memory on logs both locally and on Spaces.  
In terms of logs on Spaces, the log tab is all we could access as well.  
Let me try running it here locally, I’ll let you know

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:23pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F7 "2024-05-24T15:23:00Z")

</div>

It would be helpful if someone could kill the container in HF, delete the old image to force building a new one. In my own experience with docker, and other colleagues confirm the same, sometimes rebuilding but without removing the old image does not work.

Many thanks for your help. Looking forward to your own local check 🙏

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 24, 2024, 3:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F8 "2024-05-24T15:25:01Z")

</div>

> [@cyberosa](#):
>
> It would be helpful if someone could kill the container in HF, delete the old image to force building a new one. In my own experience with docker, and other colleagues confirm the same, sometimes rebuilding but without removing the old image does not work.

You can do that by doing a factory reboot. Have you tried it?

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F9 "2024-05-24T15:26:29Z")

</div>

## Factory rebuild

Click this button to trigger a factory rebuild of your Space. This will invalidate Docker layer caches and rebuild your space from scratch, reinstalling all dependencies.

Was not aware of this option… let me try

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 24, 2024, 3:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F10 "2024-05-24T15:36:08Z")

</div>

No. It did not help. Same error. This is the memory consumption of the app running on my computer:

 ![Screenshot 2024-05-24 at 17.35.49](https://us1.discourse-cdn.com/hellohellohello/original/3X/b/2/b2722f15bb621b906501ba74f5b30b7143833599.png)

I am playing with the app and it works perfectly fine. Any other ideas?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 24, 2024, 5:13pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F11 "2024-05-24T17:13:42Z")

</div>

hi it seems like there is a memory spike on `prepare_data()` which is causing the OOM issue.

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 25, 2024, 3:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F12 "2024-05-25T15:20:47Z")

</div>

Many thanks @radames May I ask which tool did you use to identify the source of trouble?  
I will work on refactoring the app and try again my luck next week 🙂

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 28, 2024, 6:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F13 "2024-05-28T18:39:25Z")

</div>

on linux you can run `htop` and watch memory usage, it peaked over 28.7RAM

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/d/2/d25ad8acb2e382a8cef1f62de54133e84019c3b3.png)

---

<div class="post-metadata">

**Author:** ![cyberosa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/cyberosa/32/27318_2.png) [@cyberosa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fcyberosa)%5C
**Post date:** [May 29, 2024, 7:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F14 "2024-05-29T07:26:08Z")

</div>

In the end, the issue was in the way we were computing errors in one parquet file. The app was parsing the data in the wrong way. Once that was changed the app is running again. Anyway I detected some performance improvements that can be done and we will be working on that soon.  
Many thanks for your helpful support.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fradames)%5C
**Post date:** [May 29, 2024, 6:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F15 "2024-05-29T18:30:42Z")

</div>

Amazing! I’m glad it worked!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [May 30, 2024, 6:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fruntime-error-in-paid-space-after-upgrade-and-no-info%2F88288%2F16 "2024-05-30T06:30:58Z")

</div>

Closed on May 30, 2024, 6:30am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
