You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
download the reproduction from stackblitz (won't work there)
run pnpm i && pnpm ssr
see the heap size & alive app instances grow with each request
The script creates 1000 fresh ssr apps, renders them to string and tracks whether each of them gets garbage-collected.
2 sibling async SFC components with top-level await are needed for this to reproduce. One of them needs to capture a stop handle for an immediate watcher, which then ends up keeping the whole scope in memory and through it, the whole app. (probably)
ComponentA
<script setup>
constenabled=awaitPromise.resolve(false)constel=ref(null)conststopWatch=watch(() =>el.value, () => {}, { immediate:true }) // actually runs on the serveronScopeDispose(() => { stopWatch() })
</script>
<template>
<divref="el">Component A {{ enabled }}</div>
</template>
Activity
cernymatej commentedon Apr 17, 2026
I've just noticed that there was a similar issue closed recently because of a non-reproducible reproduction: #14706
I believe the one I provided should work fine.
fix(reactivity): unlink effect scopes on out-of-order off
fix(reactivity): unlink effect scopes on out-of-order off
fix(reactivity): unlink effect scopes on out-of-order off (vuejs#14734)