Reached heap limit Allocation failed

When pushing a analog.js app i get the following error. 2024-11-14T14:03:40.429Z FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory First it builds the angular app and when building the server, I reach a limit.
2024-11-14T14:03:12.957Z ✓ built in 34.03s
2024-11-14T14:03:13.119Z [nitro] WARN No valid compatibility date is specified.
2024-11-14T14:03:13.120Z [nitro] ℹ Using 2024-04-03 as fallback.
2024-11-14T14:03:13.120Z Please specify compatibility date to avoid unwanted behavior changes:
2024-11-14T14:03:13.120Z - Add compatibilityDate: '2024-11-14' to the config file.
2024-11-14T14:03:13.120Z - Or set COMPATIBILITY_DATE=2024-11-14 environment variable.
2024-11-14T14:03:13.198Z Prerendering static pages...
2024-11-14T14:03:14.004Z Building Server...
2024-11-14T14:03:40.428Z <--- Last few GCs --->
2024-11-14T14:03:40.429Z [1666:0x7f4a03f05690] 69054 ms: Scavenge (reduce) 2037.3 (2081.0) -> 2037.0 (2081.3) MB, 8.18 / 0.00 ms (average mu = 0.236, current mu = 0.181) allocation failure;
2024-11-14T14:03:40.429Z [1666:0x7f4a03f05690] 70383 ms: Mark-Compact (reduce) 2037.9 (2082.0) -> 2037.8 (2082.8) MB, 1150.88 / 0.02 ms (+ 30.7 ms in 6 steps since start of marking, biggest step 7.2 ms, walltime since start of marking 1189 ms) (average mu = 0.192, current mu
2024-11-14T14:03:40.429Z <--- JS stacktrace --->
2024-11-14T14:03:40.429Z FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
2024-11-14T14:03:40.429Z ----- Native stack trace -----
2024-11-14T14:03:12.957Z ✓ built in 34.03s
2024-11-14T14:03:13.119Z [nitro] WARN No valid compatibility date is specified.
2024-11-14T14:03:13.120Z [nitro] ℹ Using 2024-04-03 as fallback.
2024-11-14T14:03:13.120Z Please specify compatibility date to avoid unwanted behavior changes:
2024-11-14T14:03:13.120Z - Add compatibilityDate: '2024-11-14' to the config file.
2024-11-14T14:03:13.120Z - Or set COMPATIBILITY_DATE=2024-11-14 environment variable.
2024-11-14T14:03:13.198Z Prerendering static pages...
2024-11-14T14:03:14.004Z Building Server...
2024-11-14T14:03:40.428Z <--- Last few GCs --->
2024-11-14T14:03:40.429Z [1666:0x7f4a03f05690] 69054 ms: Scavenge (reduce) 2037.3 (2081.0) -> 2037.0 (2081.3) MB, 8.18 / 0.00 ms (average mu = 0.236, current mu = 0.181) allocation failure;
2024-11-14T14:03:40.429Z [1666:0x7f4a03f05690] 70383 ms: Mark-Compact (reduce) 2037.9 (2082.0) -> 2037.8 (2082.8) MB, 1150.88 / 0.02 ms (+ 30.7 ms in 6 steps since start of marking, biggest step 7.2 ms, walltime since start of marking 1189 ms) (average mu = 0.192, current mu
2024-11-14T14:03:40.429Z <--- JS stacktrace --->
2024-11-14T14:03:40.429Z FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
2024-11-14T14:03:40.429Z ----- Native stack trace -----
4 Replies
elite-benni
elite-benniOP2w ago
Build log for pipeline Mie7dw0ASvijtk5DbIWPBw The server part of the app is relatively small. I did not try to add an completely new Analog app for now, will try that later tomorrow.
Aleš
Aleš2w ago
@elite-benni build containers have plenty of resources (up to 4 CPU cores and 8 GB RAM), but Node.js is not able to utilize RAM by default. You need to set this https://stackoverflow.com/questions/56982005/where-do-i-set-node-options-max-old-space-size-2048 either as env variable or as a param.
Aleš
Aleš2w ago
This is the config I've used for spartan website.
No description
elite-benni
elite-benniOP2w ago
My bad, sorry, reading your answer instantly made me realize that it was a stupid question. Build works I now get other errors, but I don't think they are regarded to zerops. THANKS!! 😉
Want results from more Discord servers?
Add your server