From f05ee5be59fb5cc0250a94c645212093e3df7f93 Mon Sep 17 00:00:00 2001 From: Neil Twigg Date: Fri, 7 Nov 2025 11:08:19 +0000 Subject: [PATCH] Limit JetStream startup concurrency to same as I/O semaphore Continues from #7482 but this will give us a bit more headroom, as `dios` are often less than the full core count and are often the limiting factor anyway. Signed-off-by: Neil Twigg --- server/jetstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/jetstream.go b/server/jetstream.go index 9584e59a91d..2213a476a74 100644 --- a/server/jetstream.go +++ b/server/jetstream.go @@ -693,7 +693,7 @@ func (s *Server) DisableJetStream() error { func (s *Server) enableJetStreamAccounts() error { // Reuse the same task workers across all accounts, so that we don't explode // with a large number of goroutines on multi-account systems. - tq := parallelTaskQueue(0) + tq := parallelTaskQueue(len(dios)) defer close(tq) // If we have no configured accounts setup then setup imports on global account.