# The Space Does not Restart

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%3E%5C
**Category:** Beginners\
**Created:** [November 13, 2025, 3:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406 "2025-11-13T15:40:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaanGoker](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@KaanGoker](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKaanGoker)%5C
**Post date:** [November 13, 2025, 3:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F1 "2025-11-13T15:40:24Z")

</div>

Somehow the log stuck at this place, the space itself is paused and I am getting 503 error when restarting the space. Could you help me out? Best regards

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/5/3/53efa7f69689517895defc82f6aad1cad7e11301.png)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [November 14, 2025, 12:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F2 "2025-11-14T00:17:55Z")

</div>

Some errors that appear in Space may be due to regulatory violations, but in this Space’s case, it seems there’s a coding error. So you’ll need to fix that first to figure out the real cause.

* * *

Short, direct answer for your Space

- You are **not** just “in the queue”.
- The Space is **paused** , and when Hugging Face tries to start the container, the start-up fails, which is why you see **Error 503**.
- In this specific Space (`KaanGoker/GetSubtitlesApp`), there **is** a concrete problem in your files: your `supervisord.conf` contains a big block of Markdown text that makes the supervisor config invalid, so the container crashes immediately.

So: the 503 is coming from a **start-up/config error** , not from simply being in a build queue.

* * *

## 1. What “Paused”, “Queue”, and 503 actually mean on Spaces

### 1.1 “Paused”

When you open your Space page, you see:

> This Space has been paused.

That message is normal. Many Spaces show the same text when the app is not currently running (owner stopped it or HF auto-paused it for inactivity).

A paused Space is supposed to work like this:

1. You (or a user) hits the Space.
2. HF schedules the container to start.
3. If the container starts successfully, the status becomes “Running” and you see your app.

If something goes wrong in step 2 or 3, HF shows a generic **“503 – Something went wrong when restarting this Space”** error. Multiple forum threads show exactly that wording when a Space cannot be restarted.

So:

- “Paused” alone is harmless.
- “Paused + 503 when you restart” means **the restart failed** (often because the container process crashed).

### 1.2 “Build queued” vs. runtime errors

In the build logs, Hugging Face prints a header like:

```plaintext
===== Build Queued at ... / Commit SHA: ... =====

```

That line is printed at the start of a build job, before Docker steps run. Seeing that line only tells you “a build was scheduled”, not whether your container later started successfully. HF forum posts show that sometimes builds really get stuck “queued” because of infra problems, but in those cases you usually see no 503 restart error, just endless “Building”.

Your situation is different:

- The Space is already built (there is a `Dockerfile`, `requirements.txt`, etc. in `main`).
- The UI says “Paused”.
- When you try to wake it, you get a 503 restart error.

That pattern matches a **container start-up failure** , not “still waiting in a build queue”.

* * *

## 2. What is wrong in _your_ Space

If we look at your repo:

- `Dockerfile` is a normal Python 3.10 + FFmpeg + Supervisor setup, copies `supervisord.conf`, the `app` folder, `streamlit_app.py`, icons, and exposes ports 7860/8000.
- `streamlit_app.py` is a Streamlit UI that talks to a FastAPI backend via `BACKEND_URL`, all fine.

The suspicious part is **`supervisord.conf`** :

````ini
[supervisord]
nodaemon=true

[program:backend]
command=uvicorn app.main:app --host 0.0.0.0 --port 8000
...

[program:frontend]
command=streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0
...

``` ← this line (start of a markdown code block)
--- ← markdown
### Adım 3: Kodu Hugging Face'e Yükleyin (En Önemli Adım)
... ← long markdown tutorial in Turkish
```bash ← fenced code block
git add .
git commit -m "Deploy GetSubtitles v1.0"
git push
``` ← closing fence

````

`supervisord.conf` must be a valid Supervisor config file (INI-style sections + key=value pairs). It **cannot** contain Markdown fences (```), headings (`###`), lists, or shell snippets. That extra tutorial content is almost certainly causing `supervisord` to fail to parse the config and exit with an error.

What happens at runtime:

1. HF runs the container with:

2. `supervisord` reads the config.

3. When it hits line ````` or `---` or `###`, parsing fails; `supervisord` exits immediately with an error.

4. The container exits right away.

5. HF tries to restart it, sees the process repeatedly failing, and shows **503 “Something went wrong when restarting this Space”** – exactly what other users see when their main process crashes at startup.

So for this particular Space:

- The 503 is almost certainly from the supervisor config being invalid.
- This is a **code/config issue inside your Space** , not a simple “in queue / paused” situation.

* * *

## 3. How this compares to other 503 cases

There are several common causes of 503 on Spaces:

1. **Container crash / server process crash**

2. **Moderation or prohibited libraries**

3. **Infra / build-stack problems**

For your Space:

- The code is a normal subtitle generator (FastAPI + Streamlit + Whisper), nothing obviously abusive.
- There is a clear local config error (`supervisord.conf` with Markdown).

So you do **not** look like case (2), and you don’t need to assume an HF infra bug (3) until you fix (1).

* * *

## 4. What you should do next

### 4.1 Fix the supervisor config

Edit `supervisord.conf` so it only contains valid Supervisor settings, for example:

```ini
[supervisord]
nodaemon=true

[program:backend]
command=uvicorn app.main:app --host 0.0.0.0 --port 8000
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:frontend]
; HF expects the main app on port 7860
command=streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

```

Remove everything after that (all the ``` fences, `---`, headings, and git instructions). That sort of text should live in `README.md`, not in `supervisord.conf`.

Commit and push. HF will rebuild your Docker image. Once the build finishes, try restarting the Space again:

- If the config was the only problem, the container should now start and the Space should leave the paused/503 state.
- If you still see 503, check the **runtime logs** for new errors (e.g. out-of-memory, missing file, etc.), the same way people in the forums do when containers fail to start.

### 4.2 When to suspect queue/infra instead of code

After fixing obvious config errors like this, _then_ consider HF-side issues if:

- Builds suddenly start failing with registry or S3 errors (401 unauthorized, 404 NoSuchKey) like in the reported build-stack bugs.
- A brand-new empty Space (no custom code) also returns 503, which HF staff have confirmed can be an infra issue.

In those situations, cloning into a new Space or contacting HF support is reasonable. But in your current state, the priority is to fix the invalid supervisor file first.

* * *

### Final summary

- “Paused” just means the Space is not running.
- “Paused + 503 when restarting” means the container fails to start; you are **not** simply waiting in a queue.
- In your `GetSubtitlesApp` Space, the `supervisord.conf` file includes non-config Markdown text, which is almost certainly making Supervisor crash, so the container exits immediately and HF shows 503.
- Clean up `supervisord.conf`, push again, and then check whether the Space starts; only if problems persist after that should you start suspecting HF infra or moderation.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [November 14, 2025, 8:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F5 "2025-11-14T08:26:24Z")

</div>

If you suspect an account issue, contact Hugging Face Support. [website@huggingface.co](mailto:website@huggingface.co)

---

<div class="post-metadata">

**Author:** ![KaanGoker](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@KaanGoker](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKaanGoker)%5C
**Post date:** [November 14, 2025, 8:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F6 "2025-11-14T08:27:14Z")

</div>

Hello,

I am experiencing a more nuanced issue with my Docker Space builds. They keep failing or pausing at different, random steps. Thanks for catching that error, I fixed that. Yet, I do not think this is an error in my code, but rather a platform or build system issue.

Here are the key problems I am facing:

**1. Restarting a Space Never Works** When a build pauses or the Space has an error (often a 503 error), I can never restart it. The “Restart” button does not work. I must delete the Space and create a new one for every single attempt.

**2. It is Very Hard to Debug** Because I have to create 5-10 new Spaces for each attempt, it is very difficult to find and fix errors. I had an error in my `supervisord.conf` file. It took me over **10 tries,** **(with exact same files)** creating new Spaces each time, **just to get one build to finish so I could see the container log and find the error.** I fixed that error, and then I had to do the same thing for at least 10 tries to find and fix two more errors.

**3. Builds are Failing at Random Points (I am Stuck)** Now, I am using the **exact same files** for every build, but the build process pauses at a different, random step every time.

Here are my last three attempts from this morning:

- **Space “GetSubtitles”:** Paused during the `apt-get install` (while installing `adwaita-icon-theme`).

- **Space “GetSubtitles2”:** Paused much later in the `apt-get install` (at `va-driver-all`).

- **Space “GetSubtitles3”:** Paused at the very beginning (“Build Queued”).

Compared to 14 hours ago, this time the same exact files cannot even pass through the “build” stage, so I can see if there is an issue inside the container page. All these last three attempts were done with advanced GPUs which were working 14 hours ago better. (Without random space pauses)

In total, I have tried 15-30 times. I was only able to see the real container log errors three times. I even had the application working one time and saw my UI, but after that Space went to sleep, it _also_ failed to restart.

This seems like a platform issue, not a code issue. Could you please check if there is a problem with the build infrastructure or my account?

Thank you.

---

<div class="post-metadata">

**Author:** ![KaanGoker](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@KaanGoker](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKaanGoker)%5C
**Post date:** [November 14, 2025, 8:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F7 "2025-11-14T08:27:54Z")

</div>

Deleted my posts by mistake. I am not sure about what is an account issue and what is not.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [November 14, 2025, 8:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fthe-space-does-not-restart%2F170406%2F8 "2025-11-14T08:29:26Z")

</div>

Well, only Hugging Face can verify that…
