diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index bfc2ddbe3..18140b031 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -104,6 +104,9 @@ export async function resolveHttpServer( } else { return require('http2').createSecureServer( { + // Manually increase the session memory to prevent 502 ENHANCE_YOUR_CALM + // errors on large numbers of requests + maxSessionMemory: 1000, ...httpsOptions, allowHTTP1: true },