Skip to content

Commit fa5e757

Browse files
committed
wait between each gateway start
1 parent 6fbb54a commit fa5e757

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kite-service/internal/core/gateway/manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ func (m *GatewayManager) populateGateways(ctx context.Context) error {
8383
}
8484

8585
for _, app := range apps {
86+
// Starting thousands of gateways at once can cause problems internally.
87+
time.Sleep(100 * time.Millisecond)
88+
8689
if err := m.addGateway(ctx, app); err != nil {
8790
slog.With("error", err).Error("failed to add gateway")
8891
}

0 commit comments

Comments
 (0)