> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fibre.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> The problems developers hit most, what causes each, and the fix: sandboxes that do not start, commands that stop, packages that will not install, servers that do not answer at their URL, and programs missing after a wake.

## A sandbox from my own image does not start

**What you see:** the create call fails after a while (`start_failed`, or an error about a port not ready).

**Why:** with your own `image`, Fibre treats it as a server: it runs the image's command and waits for it to answer
on `exposed_port` (8000). A base image like `python:3.12-slim` runs nothing that listens, or exits at once.

**Fix:** for an image you run commands in, add `"ready": "process"`. For an app image, set `exposed_port` to the
port it listens on. See [bring your own image](https://docs.fibre.dev/sandboxes/sizes.md#bring-your-own-image).

## My command stops after 30 seconds

**Why:** `POST /v1/sandboxes/{id}/exec` waits at most 30 seconds. A command still running then is stopped, and the
answer is `504 exec_timeout`.

**Fix:** use a [background command](https://docs.fibre.dev/sandboxes/running-commands.md) (`POST /v1/sandboxes/{id}/commands`), which has no
time limit, and follow its output. In the SDKs, `sbx.run()` already does this.

## `pip install` fails with "externally managed environment"

**Why:** the default image's system Python refuses packages installed outside a virtual environment.

**Fix:** `python3 -m venv /work/.venv && /work/.venv/bin/pip install …`. It takes a second. See
[install what is missing](https://docs.fibre.dev/sandboxes/sizes.md#install-what-is-missing).

## My dev server does not answer at the sandbox's URL

Check, in order:

1. **The sandbox was created with `exposed_port`** set to the port the server listens on (8000 unless set).
2. **The server listens on `0.0.0.0`**, not only `localhost`: `--host 0.0.0.0` for Vite, Next.js and most dev servers.
3. **The framework accepts the sandbox's hostname.** Vite answers "Blocked request" otherwise: set
   `__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS` to the sandbox's `hostname`, or `server.allowedHosts`.
4. **It is still running.** Start servers with `keep: true`, and check with `curl -s localhost:<port>` from an exec.

See [public URLs](https://docs.fibre.dev/connect/public-urls.md).

## A program I started is gone after the sandbox woke up

**Why:** on the `standard` runtime, only the sandbox's main program and commands started with `keep: true` carry on
across sleep. A plain command still running at the sleep is not restored.

**Fix:** start long-lived programs with `keep: true`, or use the `vm` runtime, where every process is kept. See
[what is kept](https://docs.fibre.dev/sandboxes/sleep-and-wake.md#what-is-kept).

## Command calls answer `409 not_running`

**Why:** the sandbox is asleep. Commands belong to its awake period, so their list, status and output are gone after
a sleep.

**Fix:** read results before the sandbox can sleep (a running command keeps it awake), or write them to a file and
read it with the [files API](https://docs.fibre.dev/sandboxes/files.md), which wakes the sandbox.

## My sandbox never sleeps

**Why:** something keeps it busy: a running command, a program using CPU, open network traffic (including an open
browser tab on its URL or a connected browser client), or `idle_timeout_sec: 0`.

**Fix:** check `GET /v1/billing/current` for what is awake, and the sandbox's `idle_timeout_sec`. End background
commands you no longer need. See [when it sleeps](https://docs.fibre.dev/sandboxes/sleep-and-wake.md#when-it-sleeps).

## Code in my sandbox cannot reach a site

**Why:** the sandbox was created with a `network` allow list that does not include the site, or `{"block": true}`.

**Fix:** add the host (and any host it redirects to, such as a CDN) to `allow` on a new sandbox. See
[network access](https://docs.fibre.dev/production/network.md).

## Docker says it cannot connect to the daemon

**Why:** Docker needs the `vm` runtime, and the daemon must be running.

**Fix:** create the sandbox with `needs: ["docker"]`, start `dockerd` (as the entrypoint, or in the background), and
wait for `docker info` to succeed before using it. See [Docker and Compose](https://docs.fibre.dev/use-cases/docker.md).

## `429 sandbox_limit`

**Why:** your account keeps as many sandboxes as its plan allows. Sleeping sandboxes count too.

**Fix:** delete sandboxes you no longer need (`Sandbox.list({ labels })` finds them), or move to a larger plan. See
[limits](https://docs.fibre.dev/production/errors-and-limits.md#limits).

## `429 org_limit`

**Why:** your sandboxes already use as much of the capacity that could run this one as one account may.

**Fix:** stop or delete sandboxes you no longer need, or ask for a smaller size.

## Still stuck?

Note the `request_id` from the error, the sandbox ID and what you expected, and contact support. The `request_id`
lets us find the exact request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.