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

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.

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.

@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?

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?