Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce leaks in probe endpoint reporter #3661

Merged
merged 2 commits into from
Aug 16, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(probe): restart conntrack handler periodically to clear out data
We observe a slow increase in connections reported, and are unable to
find the root cause, so clear down the data every six hours and start
from a clean sheet.
  • Loading branch information
bboreham committed Aug 13, 2019
commit eba9f31f3f691f3dfbc32d9844dc59959dfa0142
8 changes: 6 additions & 2 deletions probe/endpoint/conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,20 @@ func (c *conntrackWalker) run() {
return
}

defer log.Infof("conntrack exiting")

periodicRestart := time.After(6 * time.Hour)
// Handle conntrack events from netlink socket
for {
select {
case <-periodicRestart:
log.Debugf("conntrack periodic restart")
return
case <-c.quit:
log.Infof("conntrack quit signal - exiting")
stop()
return
case f, ok := <-events:
if !ok {
log.Errorf("conntrack events read failed - exiting")
return
}
if f.Err != nil {
Expand Down