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

Out of memory crash #45

Open
zxcat opened this issue Nov 7, 2019 · 1 comment
Open

Out of memory crash #45

zxcat opened this issue Nov 7, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@zxcat
Copy link

zxcat commented Nov 7, 2019

Found in logs:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->

[1:0x2c82030]   701909 ms: Mark-sweep 1347.6 (1440.3) -> 1332.8 (1440.8) MB, 2512.3 / 0.0 ms  (average mu = 0.250, current mu = 0.162) allocation failure scavenge might not succeed
[1:0x2c82030]   704545 ms: Mark-sweep 1348.4 (1440.8) -> 1333.2 (1441.8) MB, 2031.1 / 0.0 ms  (average mu = 0.240, current mu = 0.229) allocation failure scavenge might not succeed


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x287dc835be1d]
Security context: 0x11f39a29e6e9 <JSObject>
    1: add [0x11f39a291831](this=0x0b3fe94b9741 <Set map = 0x3f00aea041f9>,0x11f39a2c30f1 <String[10]: eventNames>)
    2: $set [0x18dedc299e01] [/usr/src/app/node_modules/mongoose/lib/document.js:829] [bytecode=0x18dcbb43ca21 offset=519](this=0x0b3fe94b9311 <model map = 0x2d590ee7fc99>,path=0x11f39a2c30f1 <String[10]: eventNames>,val=0x0b3fe94b92f1 <JSArray...

2:

    3: cleanModifiedSubpaths(aka cleanModifiedSubpaths) [0xa571d2ca6e1] [/usr/src/app/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js:22] [bytecode=0x8ec7b28ea59 offset=182](this=0x16ffdbf026f1 <undefined>,doc=0x2a6a10254871 <model map = 0x2023dbe7e119>,path=0x124a7d310...

3:

    3: /* anonymous */ [0x2fe7a658e29] [/usr/src/app/node_modules/mongoose/lib/statemachine.js:133] [bytecode=0x296280e71451 offset=87](this=0x02fe7a657aa1 <ctor map = 0x38ccfc586249>)
    4: arguments adaptor frame: 1->0
    5: forEach [0x243670a13131] [/usr/src/app/node_modules/mon...

4:

    3: from [0x22e31019f849] [buffer.js:~199] [pc=0x27d855897a0a](this=0x1c1f8f6531f1 <JSFunction Buffer (sfi = 0x22e310195f79)>,value=0x1393e883ce11 <Uint8Array map = 0x123a60184cf9>,encodingOrOffset=0x1389d9a826f1 <undefined>,length=0x1389d9a826f1 <undefined>)
    4: arguments adap...

5:

    1: /* anonymous */ [0x2d0f495f0e11] [/usr/src/app/node_modules/mongoose/lib/schema.js:~539] [pc=0xee240c57aea](this=0x20371cea45d9 <Schema map = 0xd9817105119>,path=0x238f1d0590e9 <String[7]: account>,obj=0x2c5215d826f1 <undefined>)
    2: arguments adaptor frame: 1->2
    3: applyTimestampsToChildren(aka applyTimestampsToChildren) [0x2f7389c59031] [/usr/...

6:

    2: /* anonymous */ [0x352330d7c249] [/usr/src/app/node_modules/mongoose/lib/model.js:217] [bytecode=0x1c5429305c51 offset=17](this=0x0cb3adacea39 <model map = 0x3534b2813921>,options=0x0cb3adad03a9 <SaveOptions map = 0x125b77312169>,callback=0x0cb3adad1e29 <JSFunction $__handleSave (sfi = 0x39cef79a63a1)>)
    3: /* ...

7 (several):

    0: builtin exit frame: parse(this=0x3baa9cc91a21 <Object map = 0x3d8ff70842a9>,0x2380bda93021 <Very long string[69098]>,0x3baa9cc91a21 <Object map = 0x3d8ff70842a9>)

    1: handlerWrapper [0xa9484d85ba9] [/usr/src/app/node_modules/cyberway-core-service/src/services/BlockSubscribe.js:~249] [pc=0x1b7049868be2](this=0x0a9484d85b19 <Subscription map = 0x17066d0836a1>,message=0x09284a149c31 <Mes...

Looks like something wrong with mongoose

@zxcat zxcat added the bug Something isn't working label Nov 7, 2019
@zxcat
Copy link
Author

zxcat commented Dec 15, 2019

increasing nodejs memory to 4Gb didn't resolve the issue.
changing MAX_IN_FLIGHT didn't help too.

OOM only happens while resync events, service works fine after resync.
looks like there is some memory leak or queue "overflow".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant