Skip to content
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

Contributing: astro dev - out of memory #1487

Open
hsjobeki opened this issue Jun 28, 2024 · 2 comments
Open

Contributing: astro dev - out of memory #1487

hsjobeki opened this issue Jun 28, 2024 · 2 comments
Labels
bug Something isn't working content documentation Improvements or additions to documentation

Comments

@hsjobeki
Copy link
Contributor

hsjobeki commented Jun 28, 2024

Following the getting started instructions from the readme seemed obivous.

To run local development instance follow this steps to start a local server

    $ git clone git@github.com:NixOS/nixos-homepage.git
    $ cd nixos-homepage
    $ nix-shell
    [nix-shell]$ npm install
    [nix-shell]$ npm run dev

It seemed to work. Astro prints the local url and port, where the site should be available:

 astro  v4.11.0 ready in 512 ms

┃ Local    http://localhost:4321/
┃ Network  use --host to expose

Visiting the site; after ~2 minutes of nothing rednering in the browser. My bash console prints this error.

13:15:16 [astro-icon] Loaded icons from mdi, simple-icons
13:15:42 watching for file changes...
13:15:43 [200] /community 17357ms

<--- Last few GCs --->

[487742:0x1f364b70]    69848 ms: Scavenge 1892.1 (1998.2) -> 1878.5 (1998.2) MB, 4.04 / 0.01 ms  (average mu = 0.702, current mu = 0.688) allocation failure; 
[487742:0x1f364b70]    69887 ms: Scavenge 1893.1 (1998.2) -> 1878.9 (1998.5) MB, 4.20 / 0.00 ms  (average mu = 0.702, current mu = 0.688) allocation failure; 
[487742:0x1f364b70]    72213 ms: Mark-Compact 2122.4 (2226.8) -> 2056.7 (2214.8) MB, 1315.42 / 0.18 ms  (average mu = 0.683, current mu = 0.671) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xaae84b node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
 2: 0xe332f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 3: 0xe336c4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x1052407  [node]
 5: 0x106a579 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 6: 0x1044257 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 7: 0x1044e94 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0x10240f4 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
 9: 0x1016a13 v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [node]
10: 0x117f6e7 v8::internal::JsonParser<unsigned short>::MakeString(v8::internal::JsonString const&, v8::internal::Handle<v8::internal::String>) [node]
11: 0x11854d0  [node]
12: 0x11878df v8::internal::JsonParser<unsigned short>::ParseJson(v8::internal::Handle<v8::internal::Object>) [node]
13: 0xec782b v8::internal::Builtin_JsonParse(int, unsigned long*, v8::internal::Isolate*) [node]
14: 0x189fdf6  [node]

@hsjobeki hsjobeki added content bug Something isn't working documentation Improvements or additions to documentation labels Jun 28, 2024
@thilobillerbeck
Copy link
Collaborator

This is odd, never experienced this before. Could you specify which system you are running this on?

@hsjobeki
Copy link
Contributor Author

hsjobeki commented Jul 2, 2024

A possible fix i now figured out: export NODE_OPTIONS=--max_old_space_size=8192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working content documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants