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
While debugging the issue described in hashicorp/yamux#143 I discovered that a server will open yamux connections to itself in order to collect autopilot stats. The stack trace when we check out the stream from the pool is as follows:
github.com/hashicorp/nomad/helper/pool.(*ConnPool).RPC(0xc000e02500, {0x369e892?, 0x0?}, {0x3d354c0?, 0xc0025d3860?}, {0x36d8eb2, 0x10}, {0x3466960, 0xc0022ce8c0}, {0x2e06bc0, ...})
github.com/hashicorp/nomad/helper/pool/pool.go:502 +0x16f
github.com/hashicorp/nomad/nomad.(*StatsFetcher).fetch(0xc000984d80, 0xc001a6efc0, 0xc000779490)
github.com/hashicorp/nomad/nomad/stats_fetcher.go:68 +0x26b
created by github.com/hashicorp/nomad/nomad.(*StatsFetcher).Fetch in goroutine 181
github.com/hashicorp/nomad/nomad/stats_fetcher.go:97 +0x39d
This is fairly minor but it's unnecessary overhead by opening the stream every 2 seconds, potentially using one of the 64 idle streams in the pool that could be used for real work, requiring an extra TCP connection to self, and making noise when debugging yamux issues. Ideally we'd use the in-mem codec when making this call to the agent it's originating from.
The text was updated successfully, but these errors were encountered:
tgross
changed the title
autopilot stats open extra yamux stream to the server checking the stats
autopilot stats opens extra yamux stream from server to itself
Feb 5, 2025
While debugging the issue described in hashicorp/yamux#143 I discovered that a server will open yamux connections to itself in order to collect autopilot stats. The stack trace when we check out the stream from the pool is as follows:
This is fairly minor but it's unnecessary overhead by opening the stream every 2 seconds, potentially using one of the 64 idle streams in the pool that could be used for real work, requiring an extra TCP connection to self, and making noise when debugging yamux issues. Ideally we'd use the in-mem codec when making this call to the agent it's originating from.
The text was updated successfully, but these errors were encountered: