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

pm2 goddaemon stopped suddenly after a few while (out of memory issue) #4647

Closed
wenq1 opened this issue Mar 28, 2020 · 4 comments
Closed

pm2 goddaemon stopped suddenly after a few while (out of memory issue) #4647

wenq1 opened this issue Mar 28, 2020 · 4 comments
Labels

Comments

@wenq1
Copy link

wenq1 commented Mar 28, 2020

Related to #3049

What's going wrong?

In issue #3049, it is identified that heap out of memory issue can be alleviated by passing --max-old-space-size. How can I do it when using pm2 god daemon itself?

How could we reproduce this issue?

After using Pm2 to monitor around 60 processes, it stopped suddenly

Supporting information

$ tail -1000 ~/.pm2/pm2.log (excerpted)

<--- Last few GCs --->

[9852:0x4977900] 1556218405 ms: Scavenge 2046.0 (2051.5) -> 2045.0 (2051.5) MB, 1468.5 / 0.0 ms  (average mu = 0.094, current mu = 0.018) allocation failure 
[9852:0x4977900] 1556218426 ms: Scavenge 2046.0 (2051.5) -> 2045.0 (2051.5) MB, 8.7 / 0.0 ms  (average mu = 0.094, current mu = 0.018) allocation failure 


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x1374fd9]
Security context: 0x01e34bb20fc1 <JSObject>
    1: split [0x1e34bb2d3b1](this=0x147538597a01 <Very long string[5024]>,0x130f7c50c539 <String[#1]\: \n>)
    2: /* anonymous */ [0x6c2ddad4659] [internal/child_process.js:549] [bytecode=0x27780abccd19 offset=122](this=0x3780021e3e01 <Pipe map = 0x855b06f9371>,0x147538597899 <ArrayBuffer map = 0x229b6d840891>)
    3: InternalFrame [pc: 0x12f2c1d]
    4: EntryFr...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x9da7c0 node::Abort() [PM2 v4.2.3: God Daemon (/root/.pm2)]
 2: 0x9db976 node::OnFatalError(char const*, char const*) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 3: 0xb39f1e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 4: 0xb3a299 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 5: 0xce5635  [PM2 v4.2.3: God Daemon (/root/.pm2)]
 6: 0xce5cc6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 7: 0xcf1b5a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 8: 0xcf2a65 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [PM2 v4.2.3: God Daemon (/root/.pm2)]
 9: 0xcf410f v8::internal::Heap::HandleGCRequest() [PM2 v4.2.3: God Daemon (/root/.pm2)]
10: 0xca30f4 v8::internal::StackGuard::HandleInterrupts() [PM2 v4.2.3: God Daemon (/root/.pm2)]
11: 0xff1af7 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [PM2 v4.2.3: God Daemon (/root/.pm2)]
12: 0x1374fd9  [PM2 v4.2.3: God Daemon (/root/.pm2)]

@wenq1
Copy link
Author

wenq1 commented Mar 28, 2020

And Why is #3049 closed? As far as I can see, it is yet to be resolved.

@Borkes
Copy link

Borkes commented May 19, 2020

I hava same problem. I concern about is that my processes have been killed for OOM, but pm2 daemon do not restart them.

@stale
Copy link

stale bot commented Jun 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 18, 2020
@stale stale bot closed this as completed Jul 2, 2020
@xiaozhuxiaozhi
Copy link

I hava same problem. pm2 why not restart it. Application stop. How to solve this problem?

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

No branches or pull requests

3 participants