-
-
Notifications
You must be signed in to change notification settings - Fork 221
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal javascript OOM in GC during deserialization #347
Comments
I'm having the same issue if I try to create around 500+ contexts in goroutines (less than that seems to work fine). Sample code creating ctx in loopwg := sync.WaitGroup{}
for _, currentContent := range allContent {
wg.Add(1)
go func(currentContent content, wg *sync.WaitGroup) error {
defer wg.Done()
ssrCtx, err := createSSRCtx()
if err != nil {
return fmt.Errorf("\nCan't create SSR Context for %s %w", currentContent.contentFilepath, err)
}
doSomething(ssrCtx)
ssrCtx.Close()
return nil
}(currentContent, &wg)
}
wg.Wait() The func createSSRCtx() (*v8go.Context, error) {
ssrCtx := v8go.NewContext(nil)
// Load some scripts (abbreviated)
ssrBytes, _ := afero.ReadFile(ssrFS, somepath)
ssrCtx.RunScript(string(ssrBytes), "create_ssr")
return ssrCtx, nil
} Errors
|
Same here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
if I try to run about 100 concurrent v8 instances, this error occurs.
It also occurs eventually if I run 10 concurrent instances multiple times.
Here is the code to reproduce:
https://github.com/i5heu/distribution-game/tree/e8e7a5146a1bad3c132d48c0744a410ecdc15421
run in cloned repository on commit level
e8e7a5146a1bad3c132d48c0744a410ecdc15421
:go with your browser to localhost:3333 and click on "Run" on the right half of the screen.
Error log:
The text was updated successfully, but these errors were encountered: