-
Database
Diagnose and fix database lock contention
Finds long-running transactions and lock-heavy code paths, then shortens transactions and adds deadlock retry handling.
Free Prompt
What This Does / How This Helps
Hunts down the transactions that hold locks too long, shrinks them, and makes deadlocks survivable with retries. Lock contention has a recognizable signature: everything is fine at low traffic, then under load requests start queueing behind one stuck transaction and the whole app grinds. The usual cause in vibe-coded apps is a transaction that wraps way more than it needs to, like a checkout flow that calls Stripe while holding row locks. The prompt restructures the worst offenders, enforces consistent lock ordering to prevent deadlock cycles, and adds retry handling so the deadlocks that still happen get absorbed instead of surfaced to users.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).