-
Notifications
You must be signed in to change notification settings - Fork 82
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
Example for harmony in readme is very dangerous #165
Comments
This might explain the issue I'm seeing. We're trying to compile assets for a Rails server with webpacker > uglifier. I believe we're using execjs to do so. This appears to be taking up so much memory that it crashes our CI system, even when giving it 32gb of memory:
What's the workaround for this? |
This is all a special kind of nightmare. Running an older version of uglifier (3.0.0) on our code was flat out crashing (we've seen this before but have no idea why, other than general crappiness of execjs)
So we bumped uglifier but then got this error:
And enabling the harmony flag appears to consume all available memory and crash |
thanks @lautis !! 🎊 |
Looks like this may still be an issue?
But trying to run any rspec test that builds a bundle:
Entry point to above error is Config:
|
The line:
Can lead to severe memory leaks if you are using MiniRacer via exec js. V8 is not fork safe, initializing Uglifier will spawn a context.
At Discourse we saw a giant memory leak that lead to both of these commits:
rubyjs/mini_racer@f407f68
discourse/discourse@76173de
Burning all the contexts is not ideal, so I guess the best solution would be to amend Uglifier so it "defer" initializes? That way the odds of having a context going in the master process will be very low.
The text was updated successfully, but these errors were encountered: