diff --git a/internal/cmd/worker.go b/internal/cmd/worker.go index 0a93a57..03f49ef 100644 --- a/internal/cmd/worker.go +++ b/internal/cmd/worker.go @@ -83,7 +83,7 @@ func WorkerCmd(ctx context.Context) *cobra.Command { }, } - cmd.Flags().IntVar(&multiplier, "multiplier", 12, "The multiplier (by CPUs) to run") + cmd.Flags().IntVar(&multiplier, "multiplier", 4, "The multiplier (by CPUs) to run") cmd.Flags().StringVar(&queueID, "queue", "", "The queue to work on") return cmd diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index e4fdbcd..8665c29 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -93,7 +93,7 @@ func (nw *notificationsWorker) Start() error { nw.logger.Info("starting up notifications worker", zap.Int("consumers", nw.consumers)) - prefetchLimit := int64(nw.consumers * 10) + prefetchLimit := int64(nw.consumers * 2) if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil { return err diff --git a/render.yaml b/render.yaml index 5710586..3eb4893 100644 --- a/render.yaml +++ b/render.yaml @@ -91,7 +91,7 @@ services: maxInstances: 20 targetCPUPercent: 60 buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo - startCommand: panic-monitor ./apollo worker --queue notifications --multiplier 64 + startCommand: panic-monitor ./apollo worker --queue notifications # Stuck Notifications Checker - type: worker