Description
Hi,
I have an application that has been stable several years using ChakraCore. However, I have noticed high memory consumption on a high traffic site, also support for ChakraCore is scheduled to be discontinued soon by Microsoft.
So, I've switched to using ClearScript.V8
JavaScriptEngineSwitcher.Core v3.3.0
JavaScriptEngineSwitcher.V8 v3.8.1
JavaScriptEngineSwitcher.V8.Native.win-x64 v3.8.1
However, I'm now seeing intermittent crashes of the worker process:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/2/ROOT
Process ID: 3416
Exception: System.ArgumentException
Message: Cannot pass a GCHandle across AppDomains.
Parameter name: handle
StackTrace: at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(IntPtr handle)
at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value)
at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyManaged.GetAllCachedV8Objects(IntPtr pCache, Ptr pV8ObjectPtrs)
at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.Impl64.V8Entity_DestroyHandle(Handle hEntity)
at Microsoft.ClearScript.V8.SplitProxy.V8SplitProxyNative.Impl64.Microsoft.ClearScript.V8.SplitProxy.IV8SplitProxyNative.V8Entity_DestroyHandle(Handle hEntity)
at Microsoft.ClearScript.V8.SplitProxy.V8EntityHolder.Destroy(V8EntityHolder& holder)
at Microsoft.ClearScript.V8.SplitProxy.V8ContextProxyImpl.Finalize()