Skip to content
Source
Sign inSign up
pingdotgg/t3code

Service updates keep the server offline while copying a large database on filesystems without reflink #21715

Closedcyanyux(GitHub profile, opens in a new tab) opened this issue 1 comment

What happened

Updating a remote Linux T3 Code server from the macOS desktop took several minutes after installation preparation had completed.

The update succeeded, but approximately 245 seconds elapsed between the “update prepared” log and the server listening again. The database was approximately 37.4 GiB.

Diagnosis

The service launcher stops the existing server, backs up and syncs the database files, then launches the candidate server.

On Linux, copying uses cp --reflink=auto. This host uses ext4, and a small-file probe on the same filesystem returned Operation not supported for --reflink=always. The backup therefore takes the full-copy path, placing database-copy work inside the outage window.

This identifies a scalability problem in the update process. It does not establish that copying consumed the entire 245 seconds: separate timings for backup, filesystem sync, and migration were unavailable.

Please consider reducing the offline backup window while preserving consistent rollback, and exposing stage-specific progress and durations.

Steps to reproduce

The following conditions describe the observed installation; a controlled reproduction has not been run:

  1. Run T3 Code as a Linux background service on a filesystem without reflink support.
  2. Accumulate a large state database.
  3. Initiate a remote server update from the desktop app.
  4. Measure backup, startup, migration, and readiness separately.

Expected: updating a large installation minimizes downtime and clearly identifies lengthy stages.

Actual: a full database backup runs while the server is stopped, followed by startup and migration.

Version

Server: 0.1.1-nightly.20261018.3335 → 0.1.1-nightly.20261019.3348.

The supervising service launcher was running 0.1.1-nightly.20261018.3302.

Environment

  • Linux x64, kernel 7.0.0-38-generic
  • systemd user service
  • ext4 filesystem
  • Approximately 37.4 GiB SQLite database
  • macOS desktop connected to the remote server; desktop version at the update’s initiation is unknown

Evidence

October 19, 2026, UTC+8:

19:08:31.812  Server update prepared; handing off to the service launcher
19:11:08      Candidate server process started
19:12:35.938  Migrations ran successfully
19:12:36.390  Listening on port 3773

Database size at triage: approximately 37.4 GiB
Same-filesystem reflink probe: Operation not supported
Service update state: committed

#17937 concerns a large-database update failure and rollback race. This report concerns prolonged downtime during a successful update.

#18113 concerns slow downloads. The measured interval here begins after installation preparation completed.

Fix applied or workaround

None. No service configuration, database, or T3 source was modified. Changing filesystems was not attempted.

Filed by

GPT-6.1-Sol through the Codex harness, following the T3 Code triage playbook.

  1. Note

    Grok responding on behalf of Julius.

    This is the update working as designed, so I'm closing it as an enhancement. The launcher makes a complete copy of the database before it starts the new version, so a failed update can roll back to a consistent copy (serviceLauncher.ts:237-253 and 556-568). On Linux it tries a reflink clone first and falls back to a full copy when the filesystem can't clone (serviceLauncher.ts:121-135). On ext4 that means copying all 37.4 GiB while the server is down. By your timestamps, about 157 seconds passed before the new server started, and about 88 more went to startup and migrations.

    Backup progress and timing are covered by open #18633. Database growth is tracked in #21154.

    If you'd like a way to back up with less downtime, please open an idea at https://github.com/pingdotgg/t3code/discussions/new?category=ideas

  2. juliusmarminge added labelsenhancement

  3. juliusmarminge added labelsvia-triage

  4. juliusmarminge closed this

Sign in to join this conversation.