mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #65001 from liggitt/quiet-logs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Quiet verbose apiserver logs In our production environments, these three lines accounted for ~10 logged lines per second at --v=2 Something that verbose per-request should be at a higher verbosity log level /cc @eparis /sig api-machinery
This commit is contained in:
commit
83ad4d9e96
@ -242,7 +242,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch
|
|||||||
if timeout == 0 && minRequestTimeout > 0 {
|
if timeout == 0 && minRequestTimeout > 0 {
|
||||||
timeout = time.Duration(float64(minRequestTimeout) * (rand.Float64() + 1.0))
|
timeout = time.Duration(float64(minRequestTimeout) * (rand.Float64() + 1.0))
|
||||||
}
|
}
|
||||||
glog.V(2).Infof("Starting watch for %s, rv=%s labels=%s fields=%s timeout=%s", req.URL.Path, opts.ResourceVersion, opts.LabelSelector, opts.FieldSelector, timeout)
|
glog.V(3).Infof("Starting watch for %s, rv=%s labels=%s fields=%s timeout=%s", req.URL.Path, opts.ResourceVersion, opts.LabelSelector, opts.FieldSelector, timeout)
|
||||||
|
|
||||||
watcher, err := rw.Watch(ctx, &opts)
|
watcher, err := rw.Watch(ctx, &opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -232,7 +232,7 @@ func (wc *watchChan) processEvent(wg *sync.WaitGroup) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if len(wc.resultChan) == outgoingBufSize {
|
if len(wc.resultChan) == outgoingBufSize {
|
||||||
glog.Warningf("Fast watcher, slow processing. Number of buffered events: %d."+
|
glog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+
|
||||||
"Probably caused by slow dispatching events to watchers", outgoingBufSize)
|
"Probably caused by slow dispatching events to watchers", outgoingBufSize)
|
||||||
}
|
}
|
||||||
// If user couldn't receive results fast enough, we also block incoming events from watcher.
|
// If user couldn't receive results fast enough, we also block incoming events from watcher.
|
||||||
@ -339,7 +339,7 @@ func (wc *watchChan) sendError(err error) {
|
|||||||
|
|
||||||
func (wc *watchChan) sendEvent(e *event) {
|
func (wc *watchChan) sendEvent(e *event) {
|
||||||
if len(wc.incomingEventChan) == incomingBufSize {
|
if len(wc.incomingEventChan) == incomingBufSize {
|
||||||
glog.Warningf("Fast watcher, slow processing. Number of buffered events: %d."+
|
glog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+
|
||||||
"Probably caused by slow decoding, user not receiving fast, or other processing logic",
|
"Probably caused by slow decoding, user not receiving fast, or other processing logic",
|
||||||
incomingBufSize)
|
incomingBufSize)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user