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

Disable HTTP keep-alive to avoid remote.http fd leak (CMC-1826) #182

Merged
merged 1 commit into from
Jan 24, 2018

Conversation

itzg
Copy link
Contributor

@itzg itzg commented Jan 24, 2018

Even when running the verify sub-command with the new repeat option I was able to observe an apparent leaking of FDs (example below). In http.Transport keep-alive is enabled by default and it appears the frequent re-connection is defeating/confusing Go's garbage collection of those connections.

COMMAND     PID     USER   FD      TYPE             DEVICE   SIZE/OFF       NODE NAME
___verify 13545 geof0549  cwd       DIR                1,4        224    4861757 /Users/geof0549/go/src/github.com/racker/rackspace-monitoring-poller/contrib/endpoint-agents/pzA/agentA/checks
___verify 13545 geof0549  txt       REG                1,4   15173348 8598597756 /private/var/folders/xf/96hzdx9n24s22r3_2wnw4_bxns4t3x/T/___verify_check__repeat_
___verify 13545 geof0549  txt       REG                1,4      32768 8598582046 /private/var/db/mds/messages/1804757117/se_SecurityMessages
___verify 13545 geof0549  txt       REG                1,4     837248 8598571787 /usr/lib/dyld
___verify 13545 geof0549  txt       REG                1,4 1156886528 8598581284 /private/var/db/dyld/dyld_shared_cache_x86_64h
___verify 13545 geof0549    0      PIPE 0x2307422e26013d1d      16384            ->0x2307422e2601539d
___verify 13545 geof0549    1      PIPE 0x2307422e26013ddd      16384            ->0x2307422e260158dd
___verify 13545 geof0549    2      PIPE 0x2307422e26012b1d      16384            ->0x2307422e26013a1d
___verify 13545 geof0549    3   NPOLICY
___verify 13545 geof0549    4u   KQUEUE                                          count=0, state=0xa
___verify 13545 geof0549    5u     unix 0x2307422e2918b935        0t0            ->0x2307422e2918cd85
___verify 13545 geof0549    6u     IPv4 0x2307422e270c4645        0t0        TCP office100-30.dfw1.rackspace.com:52556->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549    7r      CHR               14,1     0t4096        584 /dev/urandom
___verify 13545 geof0549    8u     IPv4 0x2307422e2850d0c5        0t0        TCP office100-30.dfw1.rackspace.com:52560->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549    9u     IPv4 0x2307422e26ff6645        0t0        TCP office100-30.dfw1.rackspace.com:52563->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   10u     IPv4 0x2307422e2708fce5        0t0        TCP office100-30.dfw1.rackspace.com:52565->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   11u     IPv4 0x2307422e2cc20ce5        0t0        TCP office100-30.dfw1.rackspace.com:52567->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   12u     IPv4 0x2307422e2cc21645        0t0        TCP office100-30.dfw1.rackspace.com:52569->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   13u     IPv4 0x2307422e2cc1fa25        0t0        TCP office100-30.dfw1.rackspace.com:52571->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   14u     IPv4 0x2307422e2cc1f0c5        0t0        TCP office100-30.dfw1.rackspace.com:52573->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   15u     IPv4 0x2307422e2719ba25        0t0        TCP office100-30.dfw1.rackspace.com:52575->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   16u     IPv4 0x2307422e18616a25        0t0        TCP office100-30.dfw1.rackspace.com:52577->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   17u     IPv4 0x2307422e16fdfce5        0t0        TCP office100-30.dfw1.rackspace.com:52582->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   18u     IPv4 0x2307422e18617385        0t0        TCP office100-30.dfw1.rackspace.com:52584->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   19u     IPv4 0x2307422e16fde0c5        0t0        TCP office100-30.dfw1.rackspace.com:52586->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   20u     IPv4 0x2307422e28a84ce5        0t0        TCP office100-30.dfw1.rackspace.com:52588->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   21u     IPv4 0x2307422e28a830c5        0t0        TCP office100-30.dfw1.rackspace.com:52590->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   22u     IPv4 0x2307422e28a83a25        0t0        TCP office100-30.dfw1.rackspace.com:52593->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   23u     IPv4 0x2307422e2cc20385        0t0        TCP office100-30.dfw1.rackspace.com:52595->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   24u     IPv4 0x2307422e275f4385        0t0        TCP office100-30.dfw1.rackspace.com:52597->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   25u     IPv4 0x2307422e275f5645        0t0        TCP office100-30.dfw1.rackspace.com:52599->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   26u     IPv4 0x2307422e275f30c5        0t0        TCP office100-30.dfw1.rackspace.com:52602->melange06.global.dfw.ohthree.com:https (ESTABLISHED)
___verify 13545 geof0549   27u     IPv4 0x2307422e184f0a25        0t0        TCP office100-30.dfw1.rackspace.com:52604->melange06.global.dfw.ohthree.com:https (ESTABLISHED)

@itzg itzg requested a review from jjbuchan January 24, 2018 16:48
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 61.149% when pulling 384e7e6 on fixes/http-check-fd-leak into 429086c on master.

@itzg itzg merged commit 8f2f0ac into master Jan 24, 2018
@itzg itzg deleted the fixes/http-check-fd-leak branch January 24, 2018 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants