agentkit icon indicating copy to clipboard operation
agentkit copied to clipboard

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

Open pallyndr opened this issue 1 year ago • 0 comments

Describe the bug Error message, when starting: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Seems Next/Node memory parameter is too small, in the Docker container. I tried adding some NODE_OPTIONS to increase memory up to 4096M. Got a different error, but still does not work. At exact same place.

I expect it works out of the box.

Steps To Reproduce When running command, as described in the documentation: docker-compose -f docker-compose.yml up -d

Desktop (please complete the following information):

  • OS: MacOS
  • MacBook Air (Intel), last one before M1.
  • Browser: Brave
  • Python 3.11.5

Additional context Logs: [+] Building 110.8s (17/20) docker:desktop-linux => [nextjs_server internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 1.60kB 0.0s => [nextjs_server internal] load metadata for docker.io/library/node:18-alpine 1.7s => [nextjs_server auth] library/node:pull token for registry-1.docker.io 0.0s => [nextjs_server internal] load .dockerignore 0.0s => => transferring context: 113B 0.0s => [nextjs_server internal] load build context 0.2s => => transferring context: 471.94kB 0.1s => [nextjs_server base 1/1] FROM docker.io/library/node:18-alpine@sha256:ca9f6cb0466f9638e59e0c249d335a07c867cd50c429b5c7830dda1bed584649 0.0s => CACHED [nextjs_server runner 1/6] WORKDIR /app 0.0s => CACHED [nextjs_server runner 2/6] RUN addgroup --system --gid 1001 nodejs 0.0s => CACHED [nextjs_server runner 3/6] RUN adduser --system --uid 1001 nextjs 0.0s => CACHED [nextjs_server deps 1/4] RUN apk add --no-cache libc6-compat 0.0s => CACHED [nextjs_server deps 2/4] WORKDIR /app 0.0s => CACHED [nextjs_server deps 3/4] COPY package.json pnpm-lock.yaml* ./ 0.0s => CACHED [nextjs_server deps 4/4] RUN yarn global add pnpm && pnpm i --frozen-lockfile 0.0s => CACHED [nextjs_server builder 2/5] COPY --from=deps /app/node_modules ./node_modules 0.0s => [nextjs_server builder 3/5] COPY . . 0.2s => [nextjs_server builder 4/5] RUN yarn run prisma:generate 7.0s => ERROR [nextjs_server builder 5/5] RUN yarn run build 101.4s

[nextjs_server builder 5/5] RUN yarn run build:
0.837 yarn run v1.22.19
0.950 $ next build
3.208 Attention: Next.js now collects completely anonymous telemetry regarding usage.
3.208 This information is used to shape Next.js' roadmap and prioritize features.
3.208 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: 3.209 https://nextjs.org/telemetry 3.209 3.463 Skipping validation of types 3.464 Linting ... 20.16 20.16 ./src/components/Common/Drawer/Drawer.tsx 20.16 4:1 Warning: @react-hookz/web import should occur before import of framer-motion import/order 20.16 20.16 ./src/components/ConversationView/MessageView/MessageEvents/MessageEvent/LLMResponse.tsx 20.16 4:1 Warning: ~/components/ConversationView/ConversationView.selectors import should occur before import of ../../../../CustomIcons/Icon import/order 20.16 52:17 Warning: Classnames 'mb-1, mt-1' could be replaced by the 'my-1' shorthand! tailwindcss/enforces-shorthand 20.16 20.16 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules 20.21 ▲ Next.js 14.0.4 20.21 - Environments: .env 20.21 20.21 Creating an optimized production build ... 68.59 68.60 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com 69.33 │ 69.33 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn 69.33 │ https://daisyui.com/docs/config 69.33 │ 69.33 ├── 2 themes are enabled. How to add more themes: 69.33 │ https://daisyui.com/docs/themes 69.33 │ 69.33 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui 69.33 69.83 69.83 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com 70.07 │ 70.07 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn 70.07 │ https://daisyui.com/docs/config 70.07 │ 70.07 ├── 2 themes are enabled. How to add more themes: 70.07 │ https://daisyui.com/docs/themes 70.07 │ 70.07 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui 70.07 70.51 70.51 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com 70.73 │ 70.73 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn 70.73 │ https://daisyui.com/docs/config 70.73 │ 70.73 ├── 2 themes are enabled. How to add more themes: 70.73 │ https://daisyui.com/docs/themes 70.73 │ 70.73 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui 70.73 100.1 100.1 <--- Last few GCs ---> 100.1 100.1 [27:0x7fc20fca8030] 98218 ms: Mark-sweep (reduce) 728.1 (749.7) -> 726.8 (745.2) MB, 472.2 / 0.0 ms (+ 213.5 ms in 49 steps since start of marking, biggest step 11.4 ms, walltime since start of marking 745 ms) (average mu = 0.414, current mu = 0.278) [27:0x7fc20fca8030] 99017 ms: Mark-sweep (reduce) 727.9 (745.2) -> 727.1 (745.7) MB, 793.5 / 0.0 ms (average mu = 0.245, current mu = 0.008) allocation failure; scavenge might not succeed 100.1 100.1 100.1 <--- JS stacktrace ---> 100.1 100.1 FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 100.8 error Command failed with signal "SIGABRT". 100.8 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


failed to solve: process "/bin/sh -c yarn run build" did not complete successfully: exit code: 1

pallyndr avatar Feb 20 '24 21:02 pallyndr