tapz
October 11, 2024, 1:06pm
1
Is there a way to increase Cursor heap size?
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0x1123f270c node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
2: 0x1123f2940 node::OnFatalError(char const*, char const*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
3: 0x10c969b34 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
4: 0x10c969ac8 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
5: 0x10cb23d18 v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
6: 0x10cb224ec v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
7: 0x10cb18c90 v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
8: 0x10cafbb7c v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
9: 0x10ceefc88 v8::internal::TickSample::print() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x15b6a3574
11: 0x15837b450
12: 0x158238fec
13: 0x158237950
14: 0x1566f9564
15: 0x1583ad038
16: 0x15571a99c
17: 0x1581f5878
18: 0x15820cb00
19: 0x15833458c
...
0x15b60b618
95: 0x10ca80f78 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
96: 0x10ca81b68 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
97: 0x10ca81cbc v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
98: 0x10caabe40 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
99: 0x11233e0a4 node::CallbackScope::~CallbackScope() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
100: 0x11233e41c node::CallbackScope::~CallbackScope() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
101: 0x112352af4 node::EmitAsyncDestroy(node::Environment*, node::async_context) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
102: 0x1123f9d68 node::OnFatalError(char const*, char const*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
103: 0x1123fa5b4 node::OnFatalError(char const*, char const*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
104: 0x1123faa34 node::OnFatalError(char const*, char const*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
105: 0x1123ed6e0 node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
106: 0x10b76ceb0 uv_barrier_destroy [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
107: 0x10b770598 uv_async_send [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
108: 0x10b780f88 uv_free_interface_addresses [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
109: 0x10b770a60 uv_run [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
110: 0x11233ed54 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
111: 0x11233f89c node::SpinEventLoop(node::Environment*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
112: 0x10b785b90 v8::ValueSerializer::Delegate::HasCustomHostObject(v8::Isolate*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
113: 0x10b781950 ElectronInitializeICUandStartNode [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
114: 0x19b420274 start [/usr/lib/dyld]
[Error - 15:37:22] Server process exited with signal SIGABRT.
[Info - 15:37:22] Connection to server got closed. Server will restart.
true
Kekc
October 11, 2024, 3:21pm
2
I have something similar:
2024-10-11 17:20:06.764 [info] [Info - 17:20:06] Emptying type cache to avoid heap overflow. Used 3686MB out of 4096MB.
2024-10-11 17:20:14.278 [info]
<--- Last few GCs --->
[33625:0x100006d0000] 203676 ms: Mark-Compact (reduce) 1574.6 (3029.2) -> 1553.0 (2876.5) MB, pooled: 0 MB, 430.12 / 0.00 ms (average mu = 0.885, current mu = 0.882) last resort; GC in old space requested
[33625:0x100006d0000] 204202 ms: Mark-Compact (reduce) 1553.0 (2876.5) -> 1553.0 (2779.2) MB, pooled: 0 MB, 526.12 / 0.00 ms (average mu = 0.738, current mu = 0.000) last resort; GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
2024-10-11 17:20:14.278 [info] 1: 0x11080a70c node::Buffer::New(v8::Isolate*, char*, unsigned long) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
2: 0x11080a940 node::OnFatalError(char const*, char const*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
3: 0x10ad81b34 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
4: 0x10ad81ac8 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::h2db382261c616d4e [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
5: 0x10af31f38 v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
6: 0x10af13938 v8::CppHeap::wrapper_descriptor() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
7: 0x109b42290 uv_tcp_simultaneous_accepts [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
8: 0x10b0c43dc v8::Platform::SystemClockTimeMillis() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
9: 0x10b0c4290 v8::Platform::SystemClockTimeMillis() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x10b0c28e4 v8::Platform::SystemClockTimeMillis() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x10b1599e4 v8::Platform::SystemClockTimeMillis() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x10b1db89c v8::Platform::SystemClockTimeMillis() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x10b30ff10 v8::internal::TickSample::print() const [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x157ea3574
15: 0x157e47c90
16: 0x150708af0
17: 0x157e0dd7c
18: 0x1511a5e70
19: 0x1511a5f4c
20: 0x15076a788
21: 0x1508163c0
22: 0x1511a61d8
23: 0x1511a6280
24: 0x157e0dd7c
25: 0x157e0dd7c
26: 0x157e0dd7c
27: 0x157e0dd7c
28: 0x1511a1e4c
29: 0x1501d7760
30: 0x1501d7b68
31: 0x1501d7d68
32: 0x150054460
33: 0x157e0b728
34: 0x157e0b418
35: 0x10ae981b8 v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
36: 0x10ad988f4 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
37: 0x110756304 node::CallbackScope::~CallbackScope() [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
38: 0x11075674c node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
39: 0x110799078 node::SetCppgcReference(v8::Isolate*, v8::Local<v8::Object>, void*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
40: 0x109b8e4a0 uv_check_start [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
41: 0x109b88b14 uv_run [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
42: 0x110756d54 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
43: 0x11075789c node::SpinEventLoop(node::Environment*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
44: 0x109b9db90 v8::ValueSerializer::Delegate::HasCustomHostObject(v8::Isolate*) [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
45: 0x109b99950 ElectronInitializeICUandStartNode [/Applications/Cursor.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
46: 0x19e090274 start [/usr/lib/dyld]
Kekc
October 14, 2024, 2:56pm
3
I had this problem because I have ~40000 of python files in the project. I was able to remove unnecessary files and resolve it. Posted details here .
tapz
November 7, 2024, 10:02am
4
It does not make any sense to try to fix this by removing files from the project. I have 96GB of memory so Cursor should use it. Really don’t understand why there is not option to set the max heap size.