V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  tim0991  ›  全部回复第 2 页 / 共 2 页
回复总数  31
1  2  
2019-12-23 16:32:29 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@index90 你的意思就是不并发?在我理解中 ip 变化 transport 必须要重新实例化吧
2019-12-23 16:10:30 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@index90 那请问应该怎么解决呢。。。。。我用 time wait 关键字搜索了一下 都说加 disable keep alive 就好了。。。。 能不能麻烦指点一下方向
2019-12-23 15:48:36 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@rimutuyuan 问题只针对单次回话,带宽是另外的问题了,假设有吧。。。
2019-12-23 15:37:58 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@monsterxx03 感谢你的意见 代码是早上在地铁上面写的 有点匆忙不好意思,然后我按照你的建议改过之后 任然是同样的错误
2019-12-23 15:35:57 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@index90 还是有问题
2019-12-23 15:30:04 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@guonaihong 谢谢 我生成环境 channel 是在 goroutine 外的,这个是临时准备用来测试的,然后 ulimit -n 我设置的是 10000W 然后 channel 长度就是 9000 这应该不算长吧,现在只有单个进程
2019-12-23 15:27:57 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@lishunan246 那请问 1. 如何控制 time wait 数量? 2 如何主动关闭 time wait?
2019-12-23 15:17:10 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@EthanDon 你好 谢谢你的回复 首先 body 我关了,其次我给 http.client 设置了超时, 最后 我在问题的结尾留了代码地址 如果你有空可以看看 帮忙指点一下的话感激不尽
2019-12-23 15:13:02 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@opengps 谢谢指点 但就事论事 想了解一下 为什么以及如何解决文中的 goroutine 泄露问题
2019-12-23 15:11:51 +08:00
回复了 tim0991 创建的主题 Go 编程语言 httpclient 并发 导致 goroutine 泄露 报错 socket too many files
@guonaihong 难道不是代理 ip 不同 transport 不同吗? transport 不同还能用同一个 client 吗?
2018-09-12 21:17:55 +08:00
回复了 leslie000666 创建的主题 程序员 Puppeteer 中文社区招募
github: tim0991
1  2  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1394 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 17:38 · PVG 01:38 · LAX 10:38 · JFK 13:38
Developed with CodeLauncher
♥ Do have faith in what you're doing.