diff --git a/server/events.go b/server/events.go index 3e257eab77..d165b9ef20 100644 --- a/server/events.go +++ b/server/events.go @@ -632,6 +632,11 @@ func (s *Server) sendInternalAccountMsgWithReply(a *Account, subject, reply stri s.mu.RLock() if s.sys == nil || s.sys.sendq == nil { s.mu.RUnlock() + if s.isShuttingDown() { + // Skip in case this was called at the end phase during shut down + // to avoid too many entries in the logs. + return nil + } return ErrNoSysAccount } c := s.sys.client diff --git a/server/stream.go b/server/stream.go index b3add51cc7..6ed1792e35 100644 --- a/server/stream.go +++ b/server/stream.go @@ -4870,6 +4870,10 @@ func (mset *stream) name() string { func (mset *stream) internalLoop() { mset.mu.RLock() + setGoRoutineLabels(pprofLabels{ + "account": mset.acc.Name, + "stream": mset.cfg.Name, + }) s := mset.srv c := s.createInternalJetStreamClient() c.registerWithAccount(mset.acc)