Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

close old connections explicitly to prevent tcp conn leak #1995

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

zhilhuan
Copy link
Collaborator

@zhilhuan zhilhuan commented Oct 8, 2016

fixed #1825

We found the tcp connections leak in traffic_stats 1.6.0. And verified the solution in 1.6.0.

The root cause is go "net/http" Client will keep idle connections for reuse. If we leave the influxDB client w/o explicitly close the transport, go GC could not re-collect the resources.

Please refer to influxdata/influxdb#6425

Not sure why the recent code in master discard the original logic to re-use influxDB client like traffic_stats 1.6.0. But anyway, we need to close old client explicitly. Otherwise, there will be lots of tcp connections leak quickly.

@trevorackerman trevorackerman merged commit 656a4c1 into Comcast:master Oct 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stats: socket: too many open files after long run time
2 participants