# Space runs OK for several hours then ? runtime error

**URL:** <https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638>\
**Category:** Spaces\
**Created:** [November 4, 2024, 11:42am UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638 "2024-11-04T11:42:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlflannery](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dlflannery](https://discuss.huggingface.co/u/dlflannery)\
**Post date:** [November 4, 2024, 11:42am UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/1 "2024-11-04T11:42:09Z")

</div>

I have a python/gradio space ([GradioTest - a Hugging Face Space by dlflannery](https://huggingface.co/spaces/dlflannery/GradioTest)) that was running fine for months until 2 days ago it wll run for several hours fine then:

# Runtime error

## Exit code: ?. Reason:

I have a Python GradioClient app running on a local computer that periodically accesses the api of the HF space. This works fine for several hours after startup then the runtime error occurs. It appears to occur at the exact time one of the api calls is made (the same API function is called each time.)

When this started 2 days ago I saw warnings about using an older version of the Gradio SDK so updated to 5.4 and have done several Factory Rebuilds. This made no difference.

This is a CPU Basic HF space.

EDIT: Now it runs for less than a half hour before the ? error

---

<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:** [November 4, 2024, 12:35pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/2 "2024-11-04T12:35:02Z")

</div>

Same here, but yours is more detailed.

---

<div class="post-metadata">

**Author:** ![ndurner](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ndurner/32/33975_2.png) [@ndurner](https://discuss.huggingface.co/u/ndurner)\
**Post date:** [November 4, 2024, 1:00pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/3 "2024-11-04T13:00:46Z")

</div>

Observations with mine:

1. Now run for a few minutes (10? 15?), then restart
2. … until they don’t - with “Exit code: ?”
3. I saw 99% CPU usage in Dev Mode via the shell (“top” command), but that was with a newer Gradio version (5.4?). Same symptoms after downgrading.

---

<div class="post-metadata">

**Author:** ![christianchlrv](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@christianchlrv](https://discuss.huggingface.co/u/christianchlrv)\
**Post date:** [November 4, 2024, 4:32pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/4 "2024-11-04T16:32:10Z")

</div>

I have the same error, in a Docker Space with Python App and in a Docker Space with Ubuntu + PHP.

---

<div class="post-metadata">

**Author:** ![christianchlrv](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@christianchlrv](https://discuss.huggingface.co/u/christianchlrv)\
**Post date:** [November 4, 2024, 4:40pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/5 "2024-11-04T16:40:23Z")

</div>

It gaves me this error:

# Runtime error

## Exit code: 128. Reason: failed to create containerd task: failed to create shim task: context deadline exceeded: unknown

---

<div class="post-metadata">

**Author:** ![dlflannery](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dlflannery](https://discuss.huggingface.co/u/dlflannery)\
**Post date:** [November 5, 2024, 12:57pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/6 "2024-11-05T12:57:24Z")

</div>

My problem has been fixed since about 7pm yesterday

---

<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:** [November 5, 2024, 1:34pm UTC](https://discuss.huggingface.co/t/space-runs-ok-for-several-hours-then-runtime-error/115638/7 "2024-11-05T13:34:01Z")

</div>

It has improved a lot here too. I don’t know if it’s completely solved yet, but I don’t think any new problems have occurred.
