reactjs / React.NET

.NET library for JSX compilation and server-side rendering of React components
https://reactjs.net/
MIT License
2.3k stars 937 forks source link

ReactSiteConfiguration.Configuration.MaxEngines recommended engines #1253

Open debrouwernele opened 3 years ago

debrouwernele commented 3 years ago

Hi,

What is the recommended setting for MaxEngines? At the moment this is our configuration: JsEngineSwitcher.Current.DefaultEngineName = V8JsEngine.EngineName; JsEngineSwitcher.Current.EngineFactories.AddV8(); ReactSiteConfiguration.Configuration.MaxEngines = 35; ReactSiteConfiguration.Configuration.ReuseJavaScriptEngines = true;

On production we had the following error: JSPool.Exceptions.JsPoolExhaustedException. There's an average of 40.000 page views per day.

We also notice that the Memory keeps filling up. We need to recycle every few days to clear the memory.

Any help is appreciated.

Kind Regards, Nele

dustinsoftware commented 3 years ago

You have a leak somewhere, the default should be fine for most applications.

We have seen this before with the v8 engine, the cause is unclear. You may have better luck with the ChakraCore engine.

Disabling pooling will also work but has worse performance..

On Fri, May 7, 2021 at 03:56, debrouwernele @.***> wrote:

Hi,

What is the recommended setting for MaxEngines? At the moment this is our configuration: JsEngineSwitcher.Current.DefaultEngineName = V8JsEngine.EngineName; JsEngineSwitcher.Current.EngineFactories.AddV8(); ReactSiteConfiguration.Configuration.MaxEngines = 35; ReactSiteConfiguration.Configuration.ReuseJavaScriptEngines = true;

On production we had the following error: JSPool.Exceptions.JsPoolExhaustedException. There's an average of 40.000 page views per day.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/reactjs/React.NET/issues/1253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHGCFV7QMGRHUC2ADNHKRLTMOTMFANCNFSM44JKK4PQ .