mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-27 02:40:30 +00:00
make gRPC error "to many keepalive pings" only show up in trace logs (#787)
hotfix #717 This comes from the agent being inactive / not sending and requesting any data if there a no pipelines waiting for him to execute. GRPC seems to only allow 2 pings without calling an actual endpoint before closing the connection. I think this will be indirectly solved in the moment we implement something like #536 https://github.com/grpc/grpc/blob/master/doc/keepalive.md Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
parent
f97f6f25b3
commit
505cf8c09a
1 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@ package rpc
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
|
@ -46,7 +47,13 @@ func (c *client) Next(ctx context.Context, f Filter) (*Pipeline, error) {
|
|||
if err == nil {
|
||||
break
|
||||
} else {
|
||||
log.Err(err).Msgf("grpc error: done(): code: %v: %s", status.Code(err), err)
|
||||
// TODO: remove after adding continuous data exchange by something like #536
|
||||
if strings.Contains(err.Error(), "\"too_many_pings\"") {
|
||||
// https://github.com/woodpecker-ci/woodpecker/issues/717#issuecomment-1049365104
|
||||
log.Trace().Err(err).Msg("grpc: to many keepalive pings without sending data")
|
||||
} else {
|
||||
log.Err(err).Msgf("grpc error: done(): code: %v: %s", status.Code(err), err)
|
||||
}
|
||||
}
|
||||
switch status.Code(err) {
|
||||
case
|
||||
|
|
Loading…
Reference in a new issue