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

Memory leak in optimizeCss #60473

Open
1 task done
dmgawel opened this issue Jan 10, 2024 · 1 comment
Open
1 task done

Memory leak in optimizeCss #60473

dmgawel opened this issue Jan 10, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template.

Comments

@dmgawel
Copy link

dmgawel commented Jan 10, 2024

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/old-currying-xtd57t

To Reproduce

  1. Enable experimental optimizeCss
  2. Keep the site running for longer time under some traffic
  3. Watch the memory grows indefinitely until the app crashes

Current vs. Expected behavior

There's some kind of memory leak when the optimizeCss (Critters) is enabled. The memory usage grows linearly to traffic and is not freed, if the pages are SSG. This eventually results in the app crash.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
Binaries:
  Node: 16.18.1
  npm: 8.19.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 13.5.6
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next start (local), Other (Deployed)

Additional context

Memory usage graph of our app:
Zrzut ekranu 2024-01-8 o 15 07 53

The drops are manual restarts to keep the app running. The moment it finally stabilizes is when we disabled optimizeCss.

@dmgawel dmgawel added the bug Issue was opened via the bug report template. label Jan 10, 2024
@rusakovic
Copy link

I think we have the issue not only with optimizeCss but with opengraph and wasm.
My ticket: #61047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants