Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dev): increase default session memory limit in HTTPS dev server to prevent disconnections on large projects. #6207

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/vite/src/node/http.ts
Expand Up @@ -97,6 +97,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
},
Expand All @@ -123,6 +126,7 @@ export async function resolveHttpsConfig(
if (!httpsOption.key || !httpsOption.cert) {
httpsOption.cert = httpsOption.key = await getCertificate(cacheDir)
}

patak-dev marked this conversation as resolved.
Show resolved Hide resolved
return httpsOption
}

Expand Down