You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go1.9
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
ubuntu17.10
What did you do?
If possible, provide a recipe for reproducing the error.
I don't which code cause the problem yet.
What did you expect to see?
goroutine num do not increase
What did you see instead?
I use pprof to get my goroutine num, I do nothing but my goroutine num continue increase, the init value is 55, but after a night, the goroutine num increase to 1779.Dose someone give me some suggestion ?
The pprof output:
the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.
Please see the Questions wiki page; it has a list of good places for asking questions. Thanks!
Closing, since this is not a bug in Go. We can re-open if it turns out this was actually a bug in the Go http library.
By default, Transport caches connections for future re-use. This may leave many open connections when accessing many hosts. This behavior can be managed using Transport's CloseIdleConnections method and the MaxIdleConnsPerHost and DisableKeepAlives fields.
Transports should be reused instead of created as needed. Transports are safe for concurrent use by multiple goroutines.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.9
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?ubuntu17.10
What did you do?
If possible, provide a recipe for reproducing the error.
I don't which code cause the problem yet.
What did you expect to see?
goroutine num do not increase
What did you see instead?
I use pprof to get my goroutine num, I do nothing but my goroutine num continue increase, the init value is 55, but after a night, the goroutine num increase to 1779.Dose someone give me some suggestion ?
The pprof output:
goroutine profile: total 1779
869 @ 0x4c974c 0x4d9228 0x822125 0x4f65c1
0x822124 net/http.(*persistConn).writeLoop+0x164 /usr/local/go/src/net/http/transport.go:1759
866 @ 0x4c974c 0x4d9228 0x820f97 0x4f65c1
0x820f96 net/http.(*persistConn).readLoop+0x7a6 /usr/local/go/src/net/http/transport.go:1654
The text was updated successfully, but these errors were encountered: