r/programming • • 10h ago

How one connection kills a database

https://planetscale.com/blog/debugging-live-database-connections
0 Upvotes

1 comment sorted by

2

u/Top-Emergency8630 7h ago

Not because of a hack, but because one unhandled exception prevented a COMMIT, kept a connection open, blocked a migration, and that migration blocked everything else.

That's not exactly true, it depends of language or framework. The problem is not the exception, is the waiting for the commit or rollback (that can be caused by other things like: slow processing, slow remote external call, etc, all inside a database transaction).