Deadlock Diagnoser

Diagnose a database deadlock from the engine's own deadlock report, reconstruct the lock cycle (A holds 1 wants 2, B holds 2 wants 1), name the root cause — almost always two code paths locking the same rows in different orders — and fix it with consistent lock ordering, shorter transactions, and a retry-the-victim safeguard. Use when the DB logs deadlock errors, when transactions intermittently fail under load, or when queries mysteriously block each other.

imtiazrayhan f516d6a 8.7 KB Updated

File contents

imtiazrayhan/agentscamp-library/tree/main/skills/deadlock-diagnoser commit f516d6ab63

Frequently asked questions

npx skillmds@latest add imtiazrayhan/deadlock-diagnoser