Changelog
Version v3.0.1
What’s new
BridgePort v3.0.1 is a reliability patch. Under sustained concurrent write load, a freshly-booted instance could intermittently return transient 500s (typically on GET /api/auth/me) whenever a second writer held the SQLite write lock. Those statements are now automatically retried, and genuinely unresolvable contention returns a retryable 503 instead of an opaque 500. No database migrations — upgrade is drop-in.
Fixes
Transient 500s under sustained write contention (#299)
BridgePort serves requests through a single synchronous better-sqlite3 connection, so it never self-contends — but when a second writer held the write lock (a long external transaction, a WAL checkpoint, or a test harness resetting state), two SQLite modes surfaced as opaque 500s:
SQLITE_BUSY— lock held pastbusy_timeout, mapped to PrismaP1008.SQLITE_BUSY_SNAPSHOT— a stale read snapshot upgrading to a write; returned immediately, sobusy_timeoutcould never absorb it.
The fix:
- Automatic retry — a Prisma client extension retries transient contention (
P1008/P1017/P2024/P2034,SQLITE_BUSY/locked) with jittered exponential backoff. Retry is per-statement and verified safe — no double-writes, including inside an interactive$transaction. - Retryable
503, not opaque500— when retries are exhausted, the request returns503 Service Unavailablewith aRetry-Afterheader, logged atwarnand kept out of Sentry.
Measured with a concurrent CRUD + /api/auth/me repro under a bursting external write lock: 24 → 0 500s.
API changes
No endpoints or fields were added, changed, or removed. One behavior change: transient database-contention errors now return 503 (with Retry-After) instead of 500. Monitoring or alerting that treats all 5xx as outages should treat these 503s as retryable.
Configuration
- New
DB_RETRY_*knobs tune retry attempts and backoff — sensible defaults, no action required. SQLITE_BUSY_TIMEOUT_MSdefault lowered5000→1000.better-sqlite3’s busy-wait is synchronous and blocks the event loop, so the per-attempt wait is kept short while the async retry loop (which frees the loop between attempts) carries longer contention.
See Configuration.
Database migrations
None — this release makes no schema changes.
Ecosystem
Alongside the 3.x line, BridgePort now has first-class infrastructure-as-code tooling (versioned independently of the platform):
- Terraform / OpenTofu provider — manage environments, servers, config, secrets, registries, images, and services declaratively. Live on both the Terraform and OpenTofu registries; source at
terraform-provider-bridgeport. - Go SDK —
github.com/bridgeinpt/bridgeport/client, a typed read + write client for the HTTP API.
Upgrade
Drop-in — pull and restart, no migrations or config changes required.
docker pull ghcr.io/bridgeinpt/bridgeport:v3.0.1-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgEyiv4hf6iBgr34ICjN6HnEP/vs Yr31eNU5HhdkQaYd4AAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQAQzL5g91VpEHH4vS6L7IftJp7NJQnkfYUd7BLVWvTbALcCIjoqnf65ol/jEO0QbKz HDrnnGVhKOtcKUU3Y4GgY= -----END SSH SIGNATURE-----