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

JavaScript heap out of memory #1169

Open
ctretyak opened this issue Feb 5, 2025 · 3 comments
Open

JavaScript heap out of memory #1169

ctretyak opened this issue Feb 5, 2025 · 3 comments
Labels
question Further information is requested

Comments

@ctretyak
Copy link

ctretyak commented Feb 5, 2025

I am using Astronvim community tailwind package with default config https://github.com/AstroNvim/astrocommunity/blob/4d8d63458cea63e704e0f08eeaf4d4c3330e19d4/lua/astrocommunity/pack/tailwindcss/init.lua

Regular (every day at least, usually often) tailwind language server is down because of memory:

[ERROR][2025-02-05 09:44:29] .../vim/lsp/rpc.lua:770	"rpc"	"/home/voyager/.local/share/nvim/mason/bin/tailwindcss-language-server"	"stderr"	"
<--- Last few GCs --->

[1341160:0x6de1000] 59744036 ms: Scavenge 4090.7 (4123.6) -> 4090.7 (4127.9) MB, pooled: 0 MB, 1.78 / 0.00 ms  (average mu = 0.997, current mu = 0.960) allocation failure; 
[1341160:0x6de1000] 59744061 ms: Mark-Compact (reduce) 4093.5 (4130.7) -> 4093.5 (4123.7) MB, pooled: 0 MB, 4.28 / 0.00 ms  (+ 0.1 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 25 ms) (average mu = 0.995, curre

<--- JS stacktrace --->

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

"
[ERROR][2025-02-05 09:44:29] .../vim/lsp/rpc.lua:770	"rpc"	"/home/voyager/.local/share/nvim/mason/bin/tailwindcss-language-server"	"stderr"	" 1: 0xe1bdfe node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
 2: 0x123e800 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 3: 0x123ead7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x146c615  [node]
 5: 0x1485e89 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 6: 0x145a558 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 7: 0x145b485 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0x143387e v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
 9: 0x1422974 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Tagged<v8::internal::Map>, v8::internal::AllocationAlignment) [node]
10: 0x142487f v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [node]
11: 0x143f25a v8::internal::Factory::NewStringFromUtf8(v8::base::Vector<char const>, v8::internal::AllocationType) [node]
12: 0x125ad1d v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [node]
13: 0x10d0977  [node]
14: 0x10d0aaf node::StringDecoder::DecodeData(v8::Isolate*, char const*, unsigned long*) [node]
15: 0x10d100d  [node]
16: 0x7da90320f745 
"


@thecrypticace
Copy link
Contributor

Interesting. I don't see this… ever. Any chance you could provide some more details about the kind of project(s) you use it on?

@thecrypticace thecrypticace added the question Further information is requested label Feb 5, 2025
@ctretyak
Copy link
Author

ctretyak commented Feb 5, 2025

Interesting. I don't see this… ever. Any chance you could provide some more details about the kind of project(s) you use it on?

This is one of monorepo (turborepo) project. Next.js

@thecrypticace
Copy link
Contributor

  • How large is the project? (number of files, number of packages, etc)
  • Do you have multiple installations of Tailwind CSS in that project or one shared installation?
  • How many tailwind configs do you have in your project?
  • Any chance you could provide LSP logs up to the point where the crash happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants