# Sprite restarts by itself 1 to 3 minutes after waking from idle (reproducible, sbd storage)

**URL:** <https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796>\
**Category:** Questions / Help\
**Tags:** sprites\
**Created:** [October 11, 2026, 1:04am UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796 "2026-10-11T01:04:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clinton](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/clinton/32/50872_2.png) [@Clinton](https://community.fly.io/u/Clinton)\
**Post date:** [October 11, 2026, 1:04am UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796/1 "2026-10-11T01:04:49Z")

</div>

I have a Sprite that restarts by itself shortly after it wakes from idle, and I can reproduce it most times. Posting the details in case staff can see what is bringing it down. All times are UTC. The Sprite is named `foreman-v5`.

The Sprite restarts with no request from us shortly after it is woken from an idle stretch (nothing connected, no keep-awake task held) and given work. We can reproduce it most times (5 of 6). It happens when the idle stretch is the second or later one since the Sprite’s last boot, not the first. Usually it comes one to three minutes after the wake; once it came 25 minutes after, with a keep-awake task held and renewed 55 s earlier.

To reproduce: let it boot; leave it with nothing connected for 31 minutes; connect and run some disk work (a `cp -a` of a repo with `node_modules`, `npm ci`); leave it again for 31 minutes; connect and run the same work. It restarts one to two minutes after the second wake.

Restarts seen (the boot id read from `/proc/sys/kernel/random/boot_id`):

| When | Boot id before | Boot id after | Notes |
| --- | --- | --- | --- |
| 2026-10-09 17:45:12 | not recorded | `e02218d9` | 73 s into a job, about 6 min after waking from 16 h idle |
| 2026-10-09 about 19:03 | `e02218d9` | `97c08146` (up 19:46:13) | keep-awake renewed with HTTP 200 at 19:02:16; nothing was connected, and it stayed down 44 min until we connected |
| 2026-10-10 00:42:11 to 00:42:52 | `97c08146` | `37833e4a` | 2 min 12 s after waking from 31 min idle |
| 2026-10-10 about 02:20:50 to 02:21:17 | `37833e4a` | `055c4491` | about 1 min after waking from 31 min idle |
| 2026-10-10 between 03:48 and 03:50:05 | `055c4491` | `196a8a66` | 1 to 2 min after waking from 31 min idle |
| 2026-10-10 06:20:30 | `196a8a66` | `848165a5` (up 06:28:21) | 25 min after waking from 31 min idle (its third idle stretch); keep-awake renewed with HTTP 200 at 06:19:35; nothing connected, and it stayed down 8 min until we connected |

Each time: free memory was 6.6 GB or more and load about 3 just before; the last minute or so of writes to the home directory were gone afterwards; and the kernel log on the new boot shows `EXT4-fs (nbd0): recovery complete`. `/proc/uptime` shows the Sprite stops counting about ten minutes into an idle stretch.

Work on a Sprite that has stayed awake (20 minute runs, four of them) never restarted it, and neither did the first wake after a boot (three of them). One run after a second idle stretch also held (2026-10-10 05:03 to 05:23, boot `196a8a66`).

The keep-awake is the heartbeat from your “Keeping a Sprite Running” page: a task on `/.sprite/api.sock` (`PUT /v1/tasks/<name>`, `"expire": "5m"`), renewed every 60 s. Two of the restarts above came with that task held and just renewed, and nothing connected.

The Sprite was created on or about 7 October 2026. `$SPRITE_STORAGE_DRIVER` is `sbd` (read 2026-10-11 00:52), so it is already on the newer storage. Its disk shows as `nbd0`. After 18 hours with nothing connected (from 2026-10-10 06:31) it woke on the same boot id, `848165a5`, with 735 s of uptime.

Questions for Fly staff, or anyone who has seen this:

1. What is restarting the machine, and is it expected after a suspend and resume?
2. The Sprite is on the newer storage (`sbd`). Your “Sprite Maintenance” page says that storage makes short-lived storage problems less likely to affect a Sprite. Each restart here lost about a minute of writes and ran an ext4 recovery: is a storage interruption what brings it down?
3. Is there a supported way to restart a Sprite on purpose before starting a long job? Other topics here mention a restart button in the dashboard and `POST /v1/sprites/<name>/restart`; neither is in the docs. Is a run started straight after one of those on a fresh boot?
4. When a Sprite goes down while a task is held and nothing is connected, is it meant to come back by itself? Ours stayed down until we connected.
5. Topic 28722 mentions a Sprites 1.1 Beta. Is this Sprite on it, and would moving to it be expected to help?

I found no topic here describing this. The nearest are 28624 (a Sprite that keeps dying) and 28340 (sessions dropping with no way to see why).

Happy to run anything on it that would help. I can give the org name as an MD5 hash if that is how you would rather find it.

---

<div class="post-metadata">

**Author:** ![Clinton](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/clinton/32/50872_2.png) [@Clinton](https://community.fly.io/u/Clinton)\
**Post date:** [October 13, 2026, 7:25pm UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796/2 "2026-10-13T19:25:53Z")

</div>

A follow-up after reading topic 28806 (reboots on 0.0.2-beta.5, answered by @benbjohnson on 13 Oct). Our signs look the same: restarts nobody asked for, EXT4-fs (nbd0): recovery complete on each new boot, the last minute of writes gone, and /var/lib/docker on nbd0. Our own scripts do not create a swap file, and I have not yet read /proc/swaps on the Sprite. Could staff check whether foreman-v5 is hit by the same storage swap problem, and whether the coming fix covers it? I can send MD5 hashes of the org and Sprite names.

---

<div class="post-metadata">

**Author:** ![benbjohnson](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/benbjohnson/32/50901_2.png) [@benbjohnson](https://community.fly.io/u/benbjohnson)\
**Post date:** [October 14, 2026, 9:19pm UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796/3 "2026-10-14T21:19:12Z")

</div>

@Clinton I investigated yours as well and it doesn’t seem to be the same issue. I added some additional diagnostics though. Can you reproduce it again and I’ll check the logs?

---

<div class="post-metadata">

**Author:** ![Clinton](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/clinton/32/50872_2.png) [@Clinton](https://community.fly.io/u/Clinton)\
**Post date:** [October 15, 2026, 12:45am UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796/4 "2026-10-15T00:45:21Z")

</div>

Thanks Ben, really appreciate you digging into it.

I tried to reproduce it this morning, same setup as before. All times UTC. The Sprite had been idle since 2026-10-11 00:52 on boot `848165a5`, so this was its second idle stretch since that boot: the kind of wake that restarted it 5 times out of 6 last week.

- Woke it at 2026-10-14 23:53:42
- Started the same load under a minute later, at 23:54:31: repo copies, `npm ci`, typecheck, lint, tests, build and a browser journey, on a loop for 20 minutes, with the keep-awake task held and renewed every 60 s
- Kept a connection open the whole time, logging the boot id and uptime every 5 s
- The run finished at 00:14:43 and I disconnected at 00:20:57

It didn’t restart this time. The boot id stayed `848165a5` the whole way, there were no gaps in the 5 s log, free memory never went below 6.5 GB and load peaked at about 5. `/proc/swaps` is empty and the storage driver is still `sbd`.

So that’s 5 restarts in 7 now for this pattern. I don’t know whether something changed on your side or I just got lucky. If the diagnostics show anything odd in that window I’d love to hear it. Otherwise I’m happy to keep trying: is there a particular shape you’d like me to run, or should I just repeat it and post the times as soon as it goes down?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [October 25, 2026, 12:46am UTC](https://community.fly.io/t/sprite-restarts-by-itself-1-to-3-minutes-after-waking-from-idle-reproducible-sbd-storage/28796/5 "2026-10-25T00:46:04Z")

</div>

Closed on October 25, 2026, 12:46am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
