diff --git a/app/tier2.go b/app/tier2.go index 1c81a245c..77cbdcdd8 100644 --- a/app/tier2.go +++ b/app/tier2.go @@ -141,11 +141,6 @@ func (a *Tier2App) IsReady(ctx context.Context) bool { } func (a *Tier2App) setReadiness(ready bool) { - if a.isReady.Load() && !ready { - a.logger.Debug("setting app readiness to false") - } else if !a.isReady.Load() && ready { - a.logger.Debug("setting app readiness to true") - } a.isReady.Store(ready) } diff --git a/orchestrator/work/worker.go b/orchestrator/work/worker.go index 94b502d52..7bbc36880 100644 --- a/orchestrator/work/worker.go +++ b/orchestrator/work/worker.go @@ -103,7 +103,7 @@ func (w *RemoteWorker) Work(ctx context.Context, unit stage.Unit, workRange *blo var res *Result retryIdx := 0 startTime := time.Now() - maxRetries := 100 //TODO: make this configurable + maxRetries := 720 //TODO: make this configurable err := derr.RetryContext(ctx, uint64(maxRetries), func(ctx context.Context) error { res = w.work(ctx, request, moduleNames, upstream) err := res.Error diff --git a/service/tier2.go b/service/tier2.go index e37a3d78f..e89783665 100644 --- a/service/tier2.go +++ b/service/tier2.go @@ -123,16 +123,15 @@ func NewTier2( func (s *Tier2Service) isOverloaded() bool { s.connectionCountMutex.RLock() defer s.connectionCountMutex.RUnlock() - s.logger.Debug("checking if service is overloaded", zap.Int64("current_concurrent_requests", s.currentConcurrentRequests), zap.Int64("max_concurrent_requests", s.runtimeConfig.MaxConcurrentRequests)) - return s.runtimeConfig.MaxConcurrentRequests != 0 && s.currentConcurrentRequests >= s.runtimeConfig.MaxConcurrentRequests + + isOverloaded := s.runtimeConfig.MaxConcurrentRequests > 0 && s.currentConcurrentRequests >= s.runtimeConfig.MaxConcurrentRequests + return isOverloaded } func (s *Tier2Service) incrementConcurrentRequests() { s.connectionCountMutex.Lock() defer s.connectionCountMutex.Unlock() - s.logger.Debug("incrementing concurrent requests", zap.Int64("current_concurrent_requests", s.currentConcurrentRequests)) - s.currentConcurrentRequests++ s.setOverloaded() } @@ -141,19 +140,12 @@ func (s *Tier2Service) decrementConcurrentRequests() { s.connectionCountMutex.Lock() defer s.connectionCountMutex.Unlock() - s.logger.Debug("decrementing concurrent requests", zap.Int64("current_concurrent_requests", s.currentConcurrentRequests)) - s.currentConcurrentRequests-- s.setOverloaded() } func (s *Tier2Service) setOverloaded() { overloaded := s.runtimeConfig.MaxConcurrentRequests != 0 && s.currentConcurrentRequests >= s.runtimeConfig.MaxConcurrentRequests - - if overloaded { - s.logger.Debug("service is overloaded", zap.Int64("current_concurrent_requests", s.currentConcurrentRequests), zap.Int64("max_concurrent_requests", s.runtimeConfig.MaxConcurrentRequests)) - } - s.setReadyFunc(!overloaded) }