January 26, 2025
Recover panics in all Goroutines you start
I recently joined a project where the codebase was written in Go. While the codebase had numerous issues, one stood out: the server restarted unexpectedly and frequently. After examining the server logs, I discovered the culprit—panic-induced crashes in Goroutines. The underlying issue was that the codebase didn’t handle panic recovery in all the Goroutines it started.
Read more