-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Hint] compile fails due to lack of memory in production. #2143
Comments
I fear this is not the golden solution. I'm still getting silent compile errors after updating c/webpack/production.js:
|
@BillyParadise In order to help debug, could you please post as much as you can of:
—to a https://gist.github.com. Please tag me via The issue here is about virtualization limitations. |
Jake, I feel stupid... I found another issue in which it describes how to turn on logging, and found it was just a missing fontawesome file. HOWEVER, the lack of logging totally exacerbated the issue. Webpacker is alien territory, likely not only for me. We need our hands held during the transition. I was about to delete my comment but you got here first. PLEASE make logging more verbose! It's easy enough for me to look stupid without help from others :) |
@BillyParadise how to turn on logging that helped you solve the problem ? |
@salimane I guess he referred to #955 (comment):
|
I've been using webpacker for about a year now, i am a horrible end user, where I know very little about the internals of the compilation process, so I always assume i misconfigured something/somewhere. Over the past year have burned multiple times now by memory pressure events. There isn't anything unique about the environments, pretty vanilla web servers, on a One such occurrence was a deploy, during peak time at 70% mem utilization, because of a cache miss, the precompile step of the deploy caused a cascading failure. Load balancer removing hosts, services being terminated, puma threads being dropped. Which then lead spot flee instances being spun up and linear deploys/provisioning blocked on asset compilation. I'm seeing some solutions, but it would be great if there were opinionated defaults that would prevent Just now, my quiet staging server imploded because of memory pressure events, and my solution was to reduce/recover my total memory footprint by reducing my puma worker count to give the bull more space to do it's thang. I'm moving my chinaware to the back of the shop, but it would be cool, if instead, no bulls were released in my shop. I dont think this is unique to this specific project, i feel like people have been trying to tame this for years. just a hot take from someone who should not be giving one. |
@rromanchuk Judging from your mis-post at 1:45 to your post now at 2:21, I am confident that posting some specific details would have been a more prudent use of that time (hot bull/chinaware analogy notwithstanding). There are libraries & errors known for hanging processes. There are known solutions for high memory usage on virtual private servers.
(If you are not seeing any errors, see if setting this helps: #2316) |
How can i use --max_old_space_size while running production bundle exec rake assets:precompile. |
You can use environment variable as in #2033 (comment)
|
@medicharlachiranjeevi Also, you need dashes instead of underscores. Here is a good discussion on the topic with examples: #1189 (comment) |
I had same issue and using swap memory solved the issue. use swap memory guide for digitalocean |
Can this issue be closed? Feel free to reopen this issue if needed |
Webpacker is parallelized during production build.
See below for more information on parallelization.
https://github.com/webpack-contrib/terser-webpack-plugin#parallel
Parallelization may cause memory shortages because each process consumes memory.
The following solutions can be used as a temporary solution.
Change
config/webpack/production.js
as below.I will fix this issue with this pull request.
#2093
The text was updated successfully, but these errors were encountered: