Tracking down a goroutine leak in production
How a forgotten context cancellation slowly ate 6 GB of memory over a week, and the pprof workflow that finally found it.
GoDebugging
Backend engineering, databases, and the occasional debugging war story.
How a forgotten context cancellation slowly ate 6 GB of memory over a week, and the pprof workflow that finally found it.
A small change to one index cut our slowest query from 1.8 s to 12 ms. Here is when partial indexes help and when they don't.
No macros, no dependencies: building a path matcher with a radix tree to understand what the big frameworks do for us.
WAL mode, busy timeouts, backups with Litestream, and the surprising number of things that just work.
Multi-stage builds, distroless bases and layer ordering: a practical checklist I now apply to every project.