# Spaces: Launch timed out, space was not healthy after 30 min

**URL:** <https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257>\
**Category:** Spaces\
**Created:** [June 6, 2023, 11:56am UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257 "2023-06-06T11:56:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulianGerhard](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/juliangerhard/32/14084_2.png) [@JulianGerhard](https://discuss.huggingface.co/u/JulianGerhard)\
**Post date:** [June 6, 2023, 11:56am UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/1 "2023-06-06T11:56:01Z")

</div>

Hi,

currently I want to create a **A100 Space** with a finetuned `Falcon-40b`-model as a **gradio app**. Everything works so far until the automatic model download starts. The model consists of 18 shards hat take approximately 2,5 minutes per shard for downloading which leads to a build/start time of approx 40-45 minutes overall.

After exactly 30 minutes the Space breaks with the error message: “ **Launch timed out, space was not healthy after 30 min** ” which actually makes sense but is unwanted though.

What can I do to prevent this behaviour?

Kind regards  
Julian

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [June 6, 2023, 10:52pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/2 "2023-06-06T22:52:58Z")

</div>

hi @JulianGerhard ,

Thank you for raising this issue. We currently have an ongoing internal discussion regarding adding a customization for the health check timer. In the meantime, we recommend using a custom [Dockerfile](https://huggingface.co/docs/hub/spaces-sdks-docker) from the Space SDK and downloading the model during the build time in the Docker layer. Please let me know if you need any assistance with this. Here is an example [Dockerfile · radames/Falcon-40b-Dockerfile at main](https://huggingface.co/spaces/radames/Falcon-40b-Dockerfile/blob/main/Dockerfile).

---

<div class="post-metadata">

**Author:** ![ridasagheer](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ridasagheer](https://discuss.huggingface.co/u/ridasagheer)\
**Post date:** [October 5, 2023, 2:31pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/3 "2023-10-05T14:31:46Z")

</div>

Hello @radames . I also have a similar question. My space builds through a docker file and then it has to download a dataset from my another huggingface dataset repo which takes more than 30 minutes and same error occurs. Is there a workaround? I am new to huggingface…

---

<div class="post-metadata">

**Author:** ![ridasagheer](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ridasagheer](https://discuss.huggingface.co/u/ridasagheer)\
**Post date:** [October 5, 2023, 2:54pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/4 "2023-10-05T14:54:46Z")

</div>

Also when I restart the space, it successfully downloads at the dataset but then throws memory error (more than 16GB) which makes sense. But does that mean that I have to go for a paid version or is there a work around?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [October 5, 2023, 5:12pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/5 "2023-10-05T17:12:43Z")

</div>

hi @ridasagheer ,

We have an undocumented parameter to customize startup duration timeout

`startup_duration_timeout: 1h`

If you’re using docker, you could eventually download and pack the dataset at the Docker build time, so you’re Space will boot up and have immediate access to the data.

> [@ridasagheer](#):
>
> Also when I restart the space, it successfully downloads at the dataset but then throws memory error (more than 16GB) which makes sense. But does that mean that I have to go for a paid version or is there a work around?

yes the free CPU tier offers 16GB RAM, if you need more you’ll need to upgrade to CPU Upgrade which offers 32GB RAM

---

<div class="post-metadata">

**Author:** ![nightfury](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nightfury/32/39775_2.png) [@nightfury](https://discuss.huggingface.co/u/nightfury)\
**Post date:** [March 1, 2024, 1:23pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/6 "2024-03-01T13:23:23Z")

</div>

Hey i am facing the similar issue.  
But now that space is using Docker sdk it throws the error for gradio mentioned in app.py.

# ModuleNotFoundError: No module named ‘gradio’

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [March 1, 2024, 1:48pm UTC](https://discuss.huggingface.co/t/spaces-launch-timed-out-space-was-not-healthy-after-30-min/42257/7 "2024-03-01T13:48:17Z")

</div>

could you please share more details about your Docker Space?
