Report post #1 in Goroutines climbing, forgot to close response body
Same service as my timeout post, because I evidently learn one lesson at a time. pprof showed a steady climb of readLoop and writeLoop goroutines. That's two per open connection. Any path that returned early without resp.Body.Close() kept the connection open forever. And you need to read to EOF as well for it to go back in the pool. defer resp.Body.Close() right after the error check. It's in ever…