RocketChat / RocketChat/Rocket.Chat

Lack of RAM leads to crash during initial configuration

Open
#30,093 1 comment 2 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

This is an install of the latest rocket.chat on an Ubuntu 22.04 LTS VM. Somewhere between steps 2 and 3 of the initial configuration screens, possibly occurring because I initially provided an email address not registered on cloud.rocket.chat (which would be nice to know), it seems that my RC instance has crashed:

Aug 16 03:57:01 rocket-server1 rocketchat[5230]: <--- Last few GCs --->
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: [5230:0x5d1b490]   168862 ms: Scavenge (reduce) 476.6 (485.3) -> 475.9 (486.3) MB, 2.6 / 0.7 ms  (average mu = 0
.179, current mu = 0.233) allocation failure
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: [5230:0x5d1b490]   171780 ms: Scavenge (reduce) 476.9 (488.3) -> 476.4 (488.3) MB, 4.0 / 1.2 ms  (average mu = 0
.179, current mu = 0.233) allocation failure
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: [5230:0x5d1b490]   173790 ms: Scavenge (reduce) 477.1 (485.3) -> 476.5 (486.3) MB, 3.3 / 0.7 ms  (average mu = 0
.179, current mu = 0.233) allocation failure
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: <--- JS stacktrace --->
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  1: 0xa3ad50 node::Abort() [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  2: 0x970199 node::FatalError(char const*, char const*) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  3: 0xbba90e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  4: 0xbbac87 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node
]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  5: 0xd76ea5  [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  6: 0xd77a2f  [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  7: 0xd8586b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  8: 0xd86db7 v8::internal::Heap::FinalizeIncrementalMarkingIfComplete(v8::internal::GarbageCollectionReason) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]:  9: 0xd8b1b2 v8::internal::IncrementalMarkingJob::Task::RunInternal() [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 10: 0xcae86b non-virtual thunk to v8::internal::CancelableTask::Run() [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 11: 0xaa9c04 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 12: 0xaaba69 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 13: 0x13c0ff6  [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 14: 0x13d3564  [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 15: 0x13c1948 uv_run [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 16: 0xa7b962 node::NodeMainInstance::Run() [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 17: 0xa03a65 node::Start(int, char**) [/usr/bin/node]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 18: 0x7f713058cd90  [/lib/x86_64-linux-gnu/libc.so.6]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 19: 0x7f713058ce40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
Aug 16 03:57:01 rocket-server1 rocketchat[5230]: 20: 0x98c5bc  [/usr/bin/node]
Aug 16 03:57:05 rocket-server1 systemd[1]: rocketchat.service: Main process exited, code=dumped, status=6/ABRT

Given the OOM reference, it looks like RC 6.3.1 can't manage with just 1GB RAM, which is documented at https://docs.rocket.chat/deploy/prepare-for-your-deployment/hardware-requirements — here's what I have

ubuntu@rocket-server1:~$ free
               total        used        free      shared  buff/cache   available
Mem:          992708      157612      677644         980      157452      680120
Swap:              0           0           0

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 deployment hardware-requirements page and the initial configuration flow for Rocket.Chat 6.3.1 on Ubuntu 22.04. Reproduce the one-GB, no-swap setup and inspect the service logs for the Node.js heap failure; done means establishing whether the documented requirement is inaccurate or the configuration flow should handle this condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, ubuntu
Domain
backend, infrastructure
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.