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

# Troubleshooting

> Why a sandbox stopped by itself, what to do when a sandbox does not answer or is in error, out of memory (exit 137), out-of-disk emails, and what common error messages mean.

Start with `boat info <id>`. It shows the state, the auto-stop time (`archiveAfter`), the reason for a stop or a failure (`error`), and the time of the last snapshot (`snapshotCompletedAt`).

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat info bx_f7k2q9hd
```

## Why did my sandbox stop?

Auto-stop is the most common cause. A stop by boat keeps the disk, the same as `boat stop`, unless the table says otherwise.

| Cause | How to check | Data |
| - | - | - |
| **Auto-stop.** The default is 1 hour, counted from the create or the last resume. A running prompt moves the time later | `archiveAfter` in `boat info` is in the past | Kept |
| **Empty wallet for 24 hours.** The included time is used and the wallet is empty. boat sends an email, then stops your sandboxes 24 hours later | `boat wallet`. Email "Your sandboxes will stop soon" | Kept |
| **Plan cancelled with an empty wallet.** The stop comes at once, with no 24-hour wait | `boat billing status` | Kept |
| **Free trial used its 25 hours of compute** | `boat billing status`. New starts fail with `trial_compute_limit_reached` | Kept. Read [Free trial](https://docs.boat.dev/free-trial.md) |
| **Forced stop after 3 days of failed saves.** A stop was refused because its snapshot kept failing | Email "could not be stopped" | Kept up to the last good snapshot. Later writes are lost |
| **Machine stopped answering for 3 days**, with no snapshot newer than the failure | Email about a sandbox that stopped responding | Kept up to the last good snapshot. Later writes are lost |
| **Account closed** | Email that confirms the closing | Kept for 30 days. Read [Close your account](https://docs.boat.dev/data-retention/close-account.md) |

Two settings change what a stop keeps:

| Setting | How to check | Data |
| - | - | - |
| [Zero data retention](https://docs.boat.dev/data-retention/zero-data-retention.md) | `boat data-retention status` | Deleted at the stop. You cannot resume |
| [Snapshots off](https://docs.boat.dev/data-retention/snapshots-and-monitoring-off.md#snapshots-off) | `"snapshots": false` in `boat info` | Erased at the stop. You cannot resume |

To get the sandbox back, run `boat resume <id>`.

> [!WARNING]
>
> boat keeps the disk of a stopped sandbox for at least 14 days. After that, automated retention cleanup can delete it once enabled, whatever caused the stop. The job currently reports candidates without deleting them in production. Read [Keep a stopped sandbox longer than 14 days](https://docs.boat.dev/snapshots/stop.md#keep-a-stopped-sandbox-longer-than-14-days).

To stop auto-stop for a long job:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat extend bx_f7k2q9hd --hours 12     # sets the auto-stop to 12 hours from now
boat extend bx_f7k2q9hd --no-auto-stop # runs until you stop it
```

Read [Auto-stop](https://docs.boat.dev/long-running-tasks/auto-stop.md). To never stop for an empty wallet, turn on **Auto top-up** on the [Billing](https://boat.dev/dashboard?tab=billing) tab, or run `boat wallet auto-top-up 50`.

## A sandbox does not answer

If commands and SSH hang, boat marks the sandbox as not answering. boat sends you an email. **Billing pauses while it does not answer.** The disk stays on the machine.

Do these steps in this order:

1. Wait a few minutes. After a kernel crash, the machine restarts by itself in about 15 seconds. The disk is not touched. A sandbox that answers again reconnects by itself, with all its data.
2. If it still does not answer, run `boat stop --force <id>`, then `boat resume <id>`. The sandbox comes back from its last good snapshot. **You lose what was written after that snapshot.** `snapshotCompletedAt` in `boat info` shows its time.
3. If the sandbox never completed a snapshot, do not stop it. [Contact us](https://docs.boat.dev/support.md). We get the disk back by hand.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat stop --force bx_f7k2q9hd
boat resume bx_f7k2q9hd
```

After 3 days without an answer, boat stops the sandbox. It falls back to its last snapshot. boat sends a reminder one day before.

> [!NOTE]
>
> `boat recover` and `POST /sandboxes/{id}/recover` are deprecated. boat removes them soon. Use the steps above.

## A sandbox is in error

`error` means that boat lost contact with the machine, or that a start failed. `boat info` shows the reason in `error`.

| Question | Answer |
| - | - |
| Am I billed? | No. Billing stops while the sandbox is in `error` |
| Is my data safe? | boat keeps the machine and its disk for 3 days. Everything up to the last snapshot is safe in any case |
| Does boat fix it by itself? | Sometimes. If the last snapshot is newer than the failure, boat rebuilds the sandbox on a new machine from that snapshot and sends you an email |
| Can I run commands? | No. Commands fail with `409 sandbox_not_ready` |

Do these steps in this order:

1. Read the reason: `boat info <id>`. Check your email from boat.
2. If it is still in `error`, run `boat resume <id>`. You lose what was written after `snapshotCompletedAt`.
3. If you cannot lose that work, do not resume. [Contact us](https://docs.boat.dev/support.md) within 3 days.

After 3 days, boat stops the sandbox. It falls back to its last snapshot.

To stop an errored sandbox without a resume, run `boat stop <id>`. To erase it, read [Delete a sandbox](https://docs.boat.dev/data-retention/delete.md).

## A command was killed: exit code 137 (out of memory)

Your programs can use all the RAM of the size except 512 MiB. boat keeps that part for its own services. Above that limit, Linux kills the process that uses the most memory. The sandbox stays up.

* The killed command ends with `exitCode` 137, and the command result shows `oomKilled: true`.
* Other processes and the sandbox keep running.
* Use less memory, or move to a bigger size. Read [Change size](https://docs.boat.dev/machines/change-size.md).

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat stop bx_f7k2q9hd
until [ "$(boat info bx_f7k2q9hd --json | jq -r .sandbox.state)" = "stopped" ]; do sleep 2; done
boat resume bx_f7k2q9hd --type large
```

## Out-of-disk emails

boat reads the disk use of each running sandbox and emails you:

| Disk use | Email |
| - | - |
| 85% | A warning. Free space before the disk fills. |
| 95% | "Out of disk". Snapshots fail, so your newest work is not saved. A stop also fails. |

You get at most one email per level per day for each sandbox. When space gets low, boat deletes caches that it can download again: the apt cache, journal logs and pulled Docker images that no container uses. boat never deletes your own files.

To free space:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
boat ssh bx_f7k2q9hd
docker system prune      # unused Docker data
sudo apt-get clean       # apt download cache
```

If the sandbox needs more disk, stop it and resume it with a bigger `--type`. If you cannot get in, [contact us](https://docs.boat.dev/support.md). Do not resume from an old snapshot if you need the unsaved work.

## A stop does not finish

A stop saves the disk first. If the save fails, boat refuses the stop, keeps the sandbox running and does not bill you while it waits. Read [When a stop is refused](https://docs.boat.dev/snapshots/stop.md#when-a-stop-is-refused).

`boat stop` returns at `stopping`. A short `stopping` is normal. To wait for `stopped`, read [Wait for the stop in a script](https://docs.boat.dev/snapshots/stop.md#wait-for-the-stop-in-a-script).

## Error messages

### `409 snapshot_data_expired`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
This sandbox's data was deleted after it was stopped for at least 14 days. Save a saved snapshot to keep data: boat snapshot <id> <name>.
```

boat deleted this sandbox's data after it had been stopped for at least 14 days. Resume, fork and a saved snapshot save of this sandbox fail. You cannot get the data back. The sandbox stays in your list until you delete it.

Next time, save a saved snapshot before day 14. Read [Keep a stopped sandbox longer than 14 days](https://docs.boat.dev/snapshots/stop.md#keep-a-stopped-sandbox-longer-than-14-days).

### `409 sandbox_starting`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
Sandbox is still starting (current state: provisioned); environment and secrets are not applied yet. Retry when the sandbox is ready.
```

The API held your command for 60 seconds, and the sandbox was still starting. Send the command again. Read [Readiness and resume speed](https://docs.boat.dev/readiness.md).

### `409 sandbox_not_ready`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
Sandbox bx_abc12345 is in error: <reason>. Run `boat resume bx_abc12345`, then retry.
```

The sandbox is in `error` or another state that cannot run commands. Run `boat resume <id>`. For `error`, read [A sandbox is in error](#a-sandbox-is-in-error).

### `409 machine_not_running`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
Sandbox bx_abc12345 is stopped. Run `boat resume bx_abc12345`, then retry.
```

The sandbox has no machine now. Usually its TTL ran out or someone stopped it. Run the `boat resume` command from the message. The body also carries `state`, and `retryable` is `true` only while the sandbox is still starting.

### `409 sandbox_stopping`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
Sandbox is still stopping and would resume on its live machine, which cannot switch size.
```

A resume during `stopping` keeps the same machine. It cannot change the size, the environment, the provider or the host. The stop finishes in a few seconds. The answer carries a `Retry-After` header and the running stop operation. Wait that many seconds, or wait for `stopped`. Then run the same resume again.

### `429 rate_limited`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
You used all 200 sandbox starts included in the last 24 hours.
Your running sandboxes keep running. New ones can start again at 14:32 UTC.

Need more now? Pick one:
  1. Pay per extra start, from $0.03 each, on your next invoice, up to $80 a month.
     boat billing extra-starts on
  2. Move to the $100 plan, 840 starts included a day.
     boat billing plan 100
  3. Add seats to your team, each seat adds 20% more starts, up to the next plan.
     https://boat.dev/dashboard?tab=billing
```

Nothing is broken. Create, fork and resume each count as one start. Run one of the commands, or wait until that time. Read [Limits and errors](https://docs.boat.dev/limits.md).

### `429 trial_compute_limit_reached`

```text theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
Trial Sandbox compute is limited to 25 hours total. Stopping, forking, or resuming does not reset that allowance.
```

The free trial used its 25 hours. The first payment removes this limit. Read [Free trial](https://docs.boat.dev/free-trial.md).

### `503 no_ready_machine`

You sent `failFast` and no machine of that size was free. Nothing was created or billed. Retry, or fall back to another size. Read [Fail fast when no machine is free](https://docs.boat.dev/machines/fail-fast.md).

### `402 credit_required`

You keep your plan's included saved snapshots or more, and you saved one more with an empty wallet. Add money with `boat wallet pay 20`, or remove a saved snapshot. Read [Saved snapshot pricing](https://docs.boat.dev/snapshots/templates.md#saved-snapshot-pricing).

## Still stuck

[Contact us](https://docs.boat.dev/support.md). Send the sandbox id and the output of `boat info <id>`.


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