diff --git a/packages/serve-cli/src/cli.ts b/packages/serve-cli/src/cli.ts index 0a62c62da4fd0..0a790df10638c 100644 --- a/packages/serve-cli/src/cli.ts +++ b/packages/serve-cli/src/cli.ts @@ -169,7 +169,7 @@ export type AddCommand = (ctx: CLIContext, cli: CLI) => void; // we dont use `Option.default()` in the command definitions because we want the CLI options to // override the config file (with option defaults, config file will always be overwritten) -const maxAvailableFork = availableParallelism(); +const maxAvailableFork = Math.max(availableParallelism() - 1, 1); export const defaultOptions = { fork: process.env.NODE_ENV === 'production' ? maxAvailableFork : 1, host: