EPISODE · Jun 12, 2026 · 7 MIN
How a Single Query Lock Brought Down Production at 3 AM
from The Software Engineering Podcast with Fexingo: Code, Architecture, and Engineering Best Practices · host Fexingo
Lucas and Luna dive into a real-world incident where a seemingly innocent database query caused a full production outage at a mid-size e-commerce company. They walk through the sequence of events: a developer ran an unindexed join on a table with 12 million rows, which escalated into a table-level lock, cascading connection pool exhaustion, and a 47-minute downtime. The hosts explain how the query looked correct in isolation, why MySQL's row-level locking didn't save them, and how the team later implemented query timeout limits, read-replica routing, and a pre-deployment query review checklist. Specific numbers include the 12-million-row table, the 47-minute outage, and the 400% increase in read traffic during a flash sale. Lucas contrasts InnoDB's row-level locking with MyISAM's table-level locking and shows why even InnoDB can escalate locks under certain conditions. Luna shares a related anecdote from her own experience with PostgreSQL advisory locks. They close with a practical recommendation: run EXPLAIN on every query before merging, and set lock_wait_timeout to a sane default. No hot takes, just a methodical postmortem that any developer can learn from. #DatabaseLocking #MySQL #ProductionOutage #QueryPerformance #InnoDB #LockEscalation #ConnectionPoolExhaustion #Postmortem #ReadReplica #EXPLAIN #LockWaitTimeout #Ecommerce #FlashSale #DeveloperExperience #Technology #SoftwareEngineering #FexingoBusiness #BusinessPodcast Keep every episode free: buymeacoffee.com/fexingo
Embed this episode
NOW PLAYING
How a Single Query Lock Brought Down Production at 3 AM
No transcript for this episode yet
Similar Episodes
No similar episodes found.
Similar Podcasts
No similar podcasts found.