Maison  >  Questions et réponses  >  le corps du texte

golang - goroutine leak

描述

需求是开发一个golang binary周期性收集host上docker container的log信息。结果运行的时候使用go pprof查看发现goroutine泄露了。自己试了半天没有解决。

详情

GitHub repo

goroutine-leak,使用govendor管理依赖包。
我把有问题的代码抽离出来放到main.go里,并且维护在了github上,地址goroutine-leak。里面默认集成了pprof功能,感兴趣的小伙伴可以一起debug学习下。

我也会不断尝试各种方法来解决这个问题。

为情所困为情所困2706 Il y a quelques jours786

répondre à tous(0)je répondrai

Pas de réponse
  • Annulerrépondre