perf(server): stop Windows port discovery thrashing WMI #6254
ClosedRioPlay(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/6254/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/preview/PortScanner.ts line 259OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -238,3 +254,6 @@238254 }239255 }240256 if (hostPlatform === "win32") {257+ // A probe that just timed out will time out again until the machine258+ // cools off; skip it for a while and use the cheap common-port path.259+ if (state.windowsListenerCooldownTicks > 0) {
- apps/server/src/preview/PortScanner.ts line 287OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -256,4 +280,8 @@256280 ProcessStdinError: recoverWindowsProbeFailure,257281 ProcessOutputLimitError: recoverWindowsProbeFailure,258282 ProcessReadError: recoverWindowsProbeFailure,259- ProcessTimeoutError: recoverWindowsProbeFailure,283+ ProcessTimeoutError: (error) =>284+ Ref.update(stateRef, (current) => ({285+ ...current,286+ windowsListenerCooldownTicks: WINDOWS_LISTENER_TIMEOUT_COOLDOWN_TICKS,287+ })).pipe(Effect.zipRight(recoverWindowsProbeFailure(error))),
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- apps/server/src/preview/PortScanner.ts line 290OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -238,3 +285,6 @@238285 }239286 }240287 if (hostPlatform === "win32") {288+ // Wall-clock cooldown + single-flight so retain/scan/poll cannot burn a289+ // tick budget or spawn overlapping PowerShell/WMI probes (#5900).290+ const gate = yield* claimWindowsListenerProbe;
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
675912db-542f-4c13-a936-a2bdbe8f66e9You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share