mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/vmselectapi: do not log connection accept/close from vmselect
These log messages became too spammy in production clusters
after the commit 190c8b463c
,
which closes idle connections from vmselect to vmstorage.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2508
This commit is contained in:
parent
1b39be3305
commit
10402459d8
1 changed files with 2 additions and 6 deletions
|
@ -129,7 +129,8 @@ func (s *Server) run() {
|
||||||
}
|
}
|
||||||
logger.Panicf("FATAL: cannot process vmselect conns at %s: %s", s.ln.Addr(), err)
|
logger.Panicf("FATAL: cannot process vmselect conns at %s: %s", s.ln.Addr(), err)
|
||||||
}
|
}
|
||||||
logger.Infof("accepted vmselect conn from %s", c.RemoteAddr())
|
// Do not log connection accept from vmselect, since this can generate too many lines
|
||||||
|
// in the log because vmselect tends to re-establish idle connections.
|
||||||
|
|
||||||
if !s.connsMap.Add(c) {
|
if !s.connsMap.Add(c) {
|
||||||
// The server is closed.
|
// The server is closed.
|
||||||
|
@ -166,13 +167,8 @@ func (s *Server) run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if !s.isStopping() {
|
|
||||||
logger.Infof("closing vmselect conn from %s", c.RemoteAddr())
|
|
||||||
}
|
|
||||||
_ = bc.Close()
|
_ = bc.Close()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
logger.Infof("processing vmselect conn from %s", c.RemoteAddr())
|
|
||||||
if err := s.processConn(bc); err != nil {
|
if err := s.processConn(bc); err != nil {
|
||||||
if s.isStopping() {
|
if s.isStopping() {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue