Comments (2)
Looking at http://<cloudprober_host>:9313/debug/pprof/goroutines, we noticed that:
For 72 failing targets:
1080 goroutines are in transport.dial and eventually in internal/poll.runtime_pollWait.
1080 goroutines in net.(*netFD).connect.func2+0xb9 net/fd_unix.go:129
1008 goroutines in net/http.(*Transport).getConn.func2.1+0x49 net/http/transport.go:965
from cloudprober.
I think client.Timeout is not having the desired effect on the underlying connection calls and we should switch to using request based contexts (when this probe was implemented HTTP requests didn't support contexts).
So this is what seems to be happening:
-
client.Timeout gets attached to the request in the form of a "Cancel" channel (req.Cancel) which gets closed at the deadline (set to time.Until(deadline)): src/net/http/client.go#L284
-
http.Transport's getConn() function is where most of HTTP level connection handling happens:
net/http/transport.go:948 -
This function uses the req.Cancel to come out of itself when req.Cancel is closed, but AFAICT, it doesn't do much to close the pending connections. It calls handlePendingDial but all that seems to be doing is decreasing the outstanding connections count:
http://google3/third_party/go/gc/src/net/http/transport.go?l=962&rcl=207119865
So even though, the HTTP request gets canceled at the timeout, underlying goroutines that handle TCP connections don't finish.
from cloudprober.
Related Issues (20)
- Running On Kubernetes pod encounter an error on OpenStack HOT 6
- Support allowed_metrics_regex in Prometheus surfacer HOT 1
- Unable to connect gRPC for dynamic configuration of cloudprober
- Support specifying prober interval / timeouts as durations HOT 1
- RDS Kubernetes Endpoints include pod name HOT 5
- HTTP probe with `file_targets` can begin first iteration with 0 targets HOT 1
- GKE Logging StackDriver Metadata error HOT 11
- Default behaviour of RDS Filter and Probing multiple matched services HOT 4
- Datadog surfacer makes cloudprober binary too big HOT 2
- [Documentation] Document file surfacer output HOT 1
- Reduce resource consumption when using file discovery with same file in multiple probes HOT 23
- Document templating language HOT 5
- Implement caching option in RDS protocol HOT 1
- Allow debugging configuration templates, and playbook HOT 3
- file_targets for probe options HOT 5
- Metrics not updated on external probe timeout HOT 6
- `additional_label`'s are missing in custom metrics of `EXTERNAL` probe HOT 3
- Socket: permission denied when run in Kubernetes HOT 2
- Failed to publish metrics to cloudwatch: MissingRegion: could not find region configuration HOT 3
- Improve documentation for cloudwatch surfacer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudprober.