Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Memory leaks in the use of SSR #131

Open
mvcruzata opened this issue Jul 6, 2018 · 1 comment
Open

Memory leaks in the use of SSR #131

mvcruzata opened this issue Jul 6, 2018 · 1 comment
Assignees

Comments

@mvcruzata
Copy link

Hi, we have a system in which we set up our websites using SSR, with a flow over 2000 rpm in production environment. Actually, we are facing memory leaks issues by rendering react component throught SSR. We are looking for alternatives for handling SSR efficiently by avoiding possible memory leaks generated by the react compoenents to render. We are evaluating the use of hypernova as framework for SSR. Have you face similar memory leaks issues before? Does Hypernova have mechanism to avoid those memory leaks? Thank you so much for your support.

@goatslacker
Copy link
Collaborator

There is no silver bullet when dealing with memory leaks. You can use createVM to sandbox your code and guard against possible leaks but you'll be trading off performance since creating a VM has some considerable overhead.

You can create a VM on each request which is the safest and most expensive approach or you can create a VM on startup and re-use for subsequent requests which saves on some of the overhead at the cost of possibly leaking memory overtime on that VM.

My advice is to set up some memory watching tools on your node servers to find the source of the memory leaks and remove them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants