RocketChat / RocketChat/Rocket.Chat

Service terminate periodically

Open
#14,287 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

I deployed rocket.chat in docker. It occurs that the service terminate periodically. The log shows the services oom. My server is 4CPU+16GB memory and the top usage of memory is about to 30% in console. So how can I solve that problem?

rocketchat_1  |
rocketchat_1  | [1:0x2b7d660] 36633486 ms: Mark-sweep 1281.6 (1453.4) -> 1281.5 (1453.4) MB, 2524.4 / 118.7 ms  allocation failure GC in old space requested
rocketchat_1  | [1:0x2b7d660] 36636279 ms: Mark-sweep 1281.5 (1453.4) -> 1281.5 (1430.4) MB, 2699.9 / 96.3 ms  last resort GC in old space requested
rocketchat_1  | [1:0x2b7d660] 36638975 ms: Mark-sweep 1281.5 (1430.4) -> 1281.5 (1430.4) MB, 2695.6 / 96.4 ms  last resort GC in old space requested
rocketchat_1  |
rocketchat_1  |
rocketchat_1  | <--- JS stacktrace --->
rocketchat_1  |
rocketchat_1  | ==== JS stack trace =========================================
rocketchat_1  |
rocketchat_1  | Security context: 0xe5bcb925879 <JSObject>
rocketchat_1  |     2: /* anonymous */ [/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:90] [bytecode=0x410442467f9 offset=0](this=0x38cd4c20c209 <JSGlobal Object>,result=0x2da618182201 <null>)
rocketchat_1  |     3: /* anonymous */(aka /* anonymous */)(this=0x2da6181822d1 <undefined>)
rocketchat_1  |     7: _tickCallback(aka _tickDomainCallback) [internal/process/next_tick.js:~193] [pc...
rocketchat_1  |
rocketchat_1  | FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
rocketchat_1  |  1: node::Abort() [node]
rocketchat_1  |  2: 0x8c21ec [node]
rocketchat_1  |  3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
rocketchat_1  |  4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
rocketchat_1  |  5: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle<v8::internal::Object>, bool, int) [node]
rocketchat_1  |  6: v8::internal::CodeGenerator::MakeCodeEpilogue(v8::internal::TurboAssembler*, v8::internal::EhFrameWriter*, v8::internal::CompilationInfo*, v8::internal::Handle<v8::internal::Object>) [node]
rocketchat_1  |  7: v8::internal::compiler::CodeGenerator::FinalizeCode() [node]
rocketchat_1  |  8: v8::internal::compiler::PipelineImpl::FinalizeCode() [node]
rocketchat_1  |  9: v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl() [node]
rocketchat_1  | 10: v8::internal::Compiler::FinalizeCompilationJob(v8::internal::CompilationJob*) [node]
rocketchat_1  | 11: v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [node]
rocketchat_1  | 12: v8::internal::StackGuard::HandleInterrupts() [node]
rocketchat_1  | 13: v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [node]
rocketchat_1  | 14: 0xade57b842fd
rocketchat_rocketchat_1 exited with code 139

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker deployment details and the Node/V8 heap-out-of-memory log included in the report. Investigate the periodic container termination and compare the reported host memory with the process or container limits. Done means the cause is identified and a verified fix or required configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript, node.js, typescript
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.