md-fileserver icon indicating copy to clipboard operation
md-fileserver copied to clipboard

Out of memory error

Open mlevesquedion opened this issue 5 years ago • 1 comments

Every now and then the application crashes with the following error message :

<--- Last few GCs --->

[27191:0x1e2b040]  2964672 ms: Mark-sweep 1398.1 (1424.5) -> 1397.6 (1424.0) MB, 538.3 / 12.3 ms  (average mu = 0.114, current mu = 0.021) allocation failure scavenge might not succeed
[27191:0x1e2b040]  2965227 ms: Mark-sweep 1398.3 (1424.0) -> 1397.9 (1424.5) MB, 553.0 / 14.5 ms  (average mu = 0.062, current mu = 0.005) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x16894c85452b]
    1: StubFrame [pc: 0x16894c79a1f0]
    2: ConstructFrame [pc: 0x16894c799d43]
Security context: 0x0ec5b4aaede9 <JSObject>
    3: /* anonymous */ [0x2a3eacd6f801] [/usr/lib/node_modules/md-fileserver/lib/watch.js:~79] [pc=0x16894ca779ac](this=0x2a3eacd57511 <FSWatcher map = 0x178dfe23c011>,event=0x0ec5b4aad251 <String[6]: rename>)
    4: arguments adaptor frame: 2->1
    5: /* anonymous */ [0x2a3eac...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x7fb864315568 node::Abort() [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 2: 0x7fb8643155b1  [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 3: 0x7fb8644d6d22 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 4: 0x7fb8644d6f78 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 5: 0x7fb8648585f2  [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 6: 0x7fb864869023 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 7: 0x7fb864869936 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 8: 0x7fb86486c07d v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
 9: 0x7fb86486c0d2 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
10: 0x7fb86483aa74 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
11: 0x7fb864aa4ca5 v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/lib/x86_64-linux-gnu/libnode.so.64]
12: 0x16894c85452b 
[1]    27191 abort (core dumped)  mdstart
<path-to-md-file-redacted>

It looks like there might be some kind of memory leak?

I am using the app to serve a local file containing my todo's, which I edit regularly. I am really enjoying how the app reloads the file as I change it. However it seems like if the server has been running for a while and/or I make several edits while it is running, it eventually crashes with the above error.

mlevesquedion avatar Aug 18 '19 01:08 mlevesquedion

I use the app for a similar purpose and got the same error just now -- I'll capture it more carefully next time and see if I can provide more info.

enbeec avatar Aug 14 '21 21:08 enbeec