PhoenixKit 2.51.0: A page for each storage bucket, with a failure log
PhoenixKit 2.51.0 gives each storage bucket a page of its own, with what it holds, who uses it, a connection test and a log of failures.
The bucket page
In Settings → Media → Buckets, a bucket’s name now opens its page at /admin/settings/media/buckets/:id. Edit stays the form, and the page offers Enable or Disable, Delete and Add to profile. It has five sections:
- Overview: location, service, connection, access type, maximum size and CDN.
- Used by: each site storage profile with its role and the libraries behind it. A user’s profile and libraries are counted, never named.
- Contents: files, objects, bytes, a capacity bar and a breakdown by library.
- Health: a Test connection button, which writes, reads and deletes a real object and is never run just by opening the page, and the files still on a bucket being drained.
- History: every change to the bucket, kept permanently.
A user’s own bucket does not open here. The page needs media.manage, like the other storage screens.
A failure log
A new bucket log records, for site buckets only, every write, read or delete that failed, and every connection test with its result and time. The same failure within a minute is one row with a count. A missing object on read or delete is not logged, since that is how a failover starts. The bucket page shows the failures of the last day and a chart of recent test times. Entries are kept for bucket_log_retention_days, 30 by default.
Upgrading
Run mix phoenix_kit.update for V208. It also adds the daily log prune job to the crontab. Until the update has run, the page shows a notice instead of an error.
Full release notes: PhoenixKit 2.51.0
2.51.0 · 4 October 2026
Added
-
A page per bucket (Settings → Media → Buckets → the bucket’s name,
/admin/settings/media/buckets/:id). Edit stays the form; the page links to it and offers Enable/Disable, Delete and Add to profile, all through the guarded context calls (a bucket in use is refused with the usual message). Five sections:- Overview — location, service, the Integrations connection (linked for a holder of
integrations_system), the “Keys on bucket” badge, access type, priority, maximum size, CDN, created and updated. The type/service/location wording now lives inStorage.BucketInfo, shared with the list. - Used by — each site profile with role, status and the libraries behind it; a user’s profile and libraries are counted, never named.
- Contents — files, objects, bytes, originals apart from derived, a capacity bar against
max_size_mb(the disk’s free space for a local bucket) and a per-library breakdown (user libraries aggregated). NewStorage.bucket_contents/1; loaded withstart_async, never inmount/3. - Health — a Test connection button (never run on open: it writes, reads and deletes a real object)
over the new
Storage.probe_bucket/1, which probes the saved bucket without passing a key through the assigns; location rows by status (Storage.bucket_location_health/1); the files still on a draining bucket. - History — every change to the bucket and to its rows in profiles, kept permanently, following live.
A user’s own bucket (V206) does not open here. The Buckets list links each name to its page. Gated by
media.managelike the other storage screens.
- Overview — location, service, the Integrations connection (linked for a holder of
-
V208: the bucket log, and a Log section on the bucket page.
phoenix_kit_bucket_log(no foreign key, so it never blocks deleting a bucket;Storage.delete_bucket/2removes the bucket’s rows) records, for a site bucket only (a user’s own bucket and an unsaved form test are never logged):- every write, read or delete that failed (
Managerreports it in the background through a dedicated supervisor capped at four tasks, skipping diagnostics when unavailable or full), with a controlled diagnostic that excludes response bodies, headers, URLs and credentials; a missing object on read or delete is how a failover starts and is not logged (failed writes are), and a success is not logged either — a row per request would swamp a busy site; - every probe of a saved bucket (
Storage.probe_bucket/1) with its result and how long it took, so latency over time comes from the probes; - the same failure within a minute of its first occurrence is one row with a count, so a bucket
that is down does not write a row per request.
The page shows the failures of the last day, the last failure, a chart of the latest probe times, and the
entries (all, or failures only). The last probe’s result now outlives a reload. A host that has not run the
update yet gets a notice instead of an error. Entries are pruned daily to
bucket_log_retention_days(default 30) byStorage.Workers.BucketLogPruneWorker;mix phoenix_kit.updateadds its cron entry (20 4 * * *) to existing hosts. The manifest declares the table, its columns, constraints and indexes.
- every write, read or delete that failed (
Fixed
- Bucket page review findings. Shared keys count once in bucket object/byte totals while every logical file and library remains counted. Failure logging has no synchronous fallback into file transactions, and log messages and displayed probe errors contain only controlled diagnostics. Continuous failures start a new row after a minute; probes sharing a timestamp have a deterministic order. Navigating to another bucket resets its probe and contents, and legacy credentials stay out of page assigns while bucket actions reload the stored row before changing it.
i18n
- New strings translated in all seven locales, 0 fuzzy.
PhoenixKit 2.51.0. Install or update: {:phoenix_kit, "~> 2.51"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.