Thanks Abel, It looks like running with "NODE_OPTIONS=--max-old-space-size=4096 yarn start:dev" worked to start the dev environment. Thanks also for the link to the related documentation
Probably a questions to the DSpace developers. Is there a reason why I might have to set this now when previously I did not? Did the requirements change with version 7.6.1 or maybe I have something wrong in my environment but this installation is nearly a stock installation. Also, still wondering if there is a way to query the DSpace version for the front-end like there is for the back-end? Thanks On Wednesday, November 22, 2023 at 6:06:00 PM UTC-5 Abel Gómez wrote: > Hi Tomas, > > looks like the memory limit in your system for node is too low. > > You can temporarily run yarn with more memory by simply running: > > NODE_OPTIONS=--max-old-space-size=4096 yarn start:dev > > If that works, the memory limit is the root cause. See > https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes for > more info. > > Since "yarn start:dev" is for debugging, I don't see the need to apply the > change permanently in your system, but you can do so by modifying the file > "package.json" (see "start:dev" in the "scripts" section: > https://github.com/DSpace/dspace-angular/blob/7e2f23aacd7a0d023ba911bd9c8acc842553f172/package.json#L9 > ). > > Abel > > > El 22/11/2023 a las 23:31, Tomas Hajek escribió: > > Hi, > I had DSpace version 7.5 running and working under pm2 (for a > production config) and I could run yarn start:dev when testing theme > updates after stopping the pm2 processes (pm2 stop dspace-ui). > I recently updated to 7.6 and then to 7.6.1. The update to 7.6 seemed > fine both on the front-end and the back-end and then I saw the information > on bug fixes for 7.6.1 so I updated the back-end to 7.6.1 and that seems to > be fine but I am now experiencing a "JavaScript heap out of memory" when > trying a "yarn start:dev". > I tried going back to 7.6 and even doing a fresh checkout of the > dspace-angular 7.6 source but am consistently now getting the same/similar > error message with 7.6. I then tried going back to 7.5 but now that seems > to also be giving a "JavaScript heap out of memory" error. > If I reboot I can get 7.5 to start in dev mode but 7.6.1 still gives a > "JavaScript heap out of memory" error. > Yarn, node, pm2, etc... is all pretty new to me so I'm thinking I have > something set somewhere now that is causing this or I need to adjust a > memory parameter somewhere but I'm at a bit of a loss as to where to look. > This is all in a test environment and I can pretty much redeploy back > to 7.5 with an Ansible playbook but I'd like to figure out where I went > wrong so any advice would be much appreciated. > > A related question, In my test environment I can go > to https://<dspace-server-name>/server/#/server/api and get > the dspaceVersion for the back-end, is there a similar way to get the > DSpace version for the front-end? I think my front-end is currently on 7.6 > but I'd like to be sure. > > Example error output below: > dspace@hajek-dspace-d01 ~/dspace-angular-src/config$ yarn start:dev > yarn run v1.22.21 > $ nodemon --exec "cross-env NODE_ENV=development yarn run serve" > [nodemon] 2.0.22 > [nodemon] to restart at any time, enter `rs` > [nodemon] watching path(s): config/**/* > [nodemon] watching extensions: json > [nodemon] starting `cross-env NODE_ENV=development yarn run serve` > $ yarn base-href > $ ts-node --project ./tsconfig.ts-node.json scripts/base-href.ts > Building development app config > Overriding app config with > /home/dspace/dspace-angular-src/config/config.yml > Overriding app config with > /home/dspace/dspace-angular-src/config/config.dev.yml > Setting baseHref to / in angular.json > $ ts-node --project ./tsconfig.ts-node.json scripts/serve.ts > Building development app config > Overriding app config with > /home/dspace/dspace-angular-src/config/config.yml > Overriding app config with > /home/dspace/dspace-angular-src/config/config.dev.yml > ⠋ Generating browser application bundles (phase: setup)...Building > development app config > Overriding app config with > /home/dspace/dspace-angular-src/config/config.yml > Overriding app config with > /home/dspace/dspace-angular-src/config/config.dev.yml > Angular config.json file generated correctly at > /home/dspace/dspace-angular-src/src/assets/config.json > > ⠙ Generating browser application bundles (phase: setup)...- > angular-idle-preload [main/commonjs] (git+ > https://github.com/gdi2290/angular-idle-preload.git) > - ng2-nouislider [es2015/esm2015] (https://github.com/tb/ng2-nouislider) > - ngx-sortablejs [es2015/esm2015] ( > https://github.com/sortablejs/ngx-sortablejs) > - ng2-file-upload [es2015/esm2015] () > ⠏ Generating browser application bundles (phase: sealing)... > <--- Last few GCs ---> > > [45299:0x55ae38e7b7f0] 263556 ms: Mark-sweep 2014.2 (2090.0) -> 2002.2 > (2094.0) MB, 2554.2 / 0.1 ms (average mu = 0.276, current mu = 0.012) > allocation failure scavenge might not succeed > [45299:0x55ae38e7b7f0] 267071 ms: Mark-sweep 2018.3 (2094.0) -> 2006.3 > (2097.5) MB, 3453.6 / 0.1 ms (average mu = 0.142, current mu = 0.017) > allocation failure scavenge might not succeed > > > <--- JS stacktrace ---> > > FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of > memory > 1: 0x55ae3544df54 node::Abort() [ng serve --host localhost --port 4000 > --serve-path / --ssl false --configuration development] > 2: 0x55ae35302700 node::OOMErrorHandler(char const*, bool) [ng serve > --host localhost --port 4000 --serve-path / --ssl false --configuration > development] > 3: 0x55ae3563ae44 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, > char const*, bool) [ng serve --host localhost --port 4000 --serve-path / > --ssl false --configuration development] > 4: 0x55ae3563b106 > v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char > const*, bool) [ng serve --host localhost --port 4000 --serve-path / --ssl > false --configuration development] > 5: 0x55ae357db209 [ng serve --host localhost --port 4000 --serve-path / > --ssl false --configuration development] > 6: 0x55ae357f453f > v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, > v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng serve > --host localhost --port 4000 --serve-path / --ssl false --configuration > development] > 7: 0x55ae357f71a4 > v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, > v8::internal::AllocationType, v8::internal::AllocationOrigin, > v8::internal::AllocationAlignment) [ng serve --host localhost --port 4000 > --serve-path / --ssl false --configuration development] > 8: 0x55ae357f7239 > v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, > v8::internal::AllocationType, v8::internal::AllocationOrigin, > v8::internal::AllocationAlignment) [ng serve --host localhost --port 4000 > --serve-path / --ssl false --configuration development] > 9: 0x55ae357c119f v8::internal::Factory::NewFillerObject(int, bool, > v8::internal::AllocationType, v8::internal::AllocationOrigin) [ng serve > --host localhost --port 4000 --serve-path / --ssl false --configuration > development] > 10: 0x55ae35b026e0 v8::internal::Runtime_AllocateInYoungGeneration(int, > unsigned long*, v8::internal::Isolate*) [ng serve --host localhost --port > 4000 --serve-path / --ssl false --configuration development] > 11: 0x55ae35ed8cd9 [ng serve --host localhost --port 4000 --serve-path / > --ssl false --configuration development] > [nodemon] clean exit - waiting for changes before restart > > > Thanks in advance for any guidance. > > -- > > Tomas Hajek > ha...@oakland.edu > 1-248-370-3505 <(248)%20370-3505> > Assistant Director, Research Computing and Infrastructure > Engineering > University Technology Services > Oakland University > > -- > All messages to this mailing list should adhere to the Code of Conduct: > https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx > --- > You received this message because you are subscribed to the Google Groups > "DSpace Technical Support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dspace-tech...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dspace-tech/CAPx-GQoEF2Wc-827kQHdLq%2Bc7%3DuijjXWArsefjLyQ9cMN9E3vw%40mail.gmail.com > > <https://groups.google.com/d/msgid/dspace-tech/CAPx-GQoEF2Wc-827kQHdLq%2Bc7%3DuijjXWArsefjLyQ9cMN9E3vw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > Abel Gómez Llana, PhD > ab...@gomez.llana.mehttps://abel.gomez.llana.me > > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/6c87d6e7-dcb9-4df3-80b5-a729f9012373n%40googlegroups.com.