Golang协程泄漏定位和排查 1 场景:无缓冲channel写阻塞 2 排查和定位思路 2.1 Golang pprof 2.2 协程数监控 2.3 操作系统内存泄漏 参考 1 场景:无缓冲channel写阻塞 package main import ( "log" "net/http" _ "net/http/pprof" "time" "github.com/gin-gonic/gin" ) func main() { go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }(