{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9652","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9652/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9652/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9652/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/9652","id":295806187,"node_id":"MDU6SXNzdWUyOTU4MDYxODc=","number":9652,"title":"FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory","user":{"login":"Gandalf-the-Grey","id":6341057,"node_id":"MDQ6VXNlcjYzNDEwNTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6341057?v=4","gravatar_id":"","url":"https://api.github.com/users/Gandalf-the-Grey","html_url":"https://github.com/Gandalf-the-Grey","followers_url":"https://api.github.com/users/Gandalf-the-Grey/followers","following_url":"https://api.github.com/users/Gandalf-the-Grey/following{/other_user}","gists_url":"https://api.github.com/users/Gandalf-the-Grey/gists{/gist_id}","starred_url":"https://api.github.com/users/Gandalf-the-Grey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gandalf-the-Grey/subscriptions","organizations_url":"https://api.github.com/users/Gandalf-the-Grey/orgs","repos_url":"https://api.github.com/users/Gandalf-the-Grey/repos","events_url":"https://api.github.com/users/Gandalf-the-Grey/events{/privacy}","received_events_url":"https://api.github.com/users/Gandalf-the-Grey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-09T09:31:37Z","updated_at":"2018-09-17T13:01:26Z","closed_at":null,"author_association":"NONE","body":"Rocket.Chat Version: `0.61.0`\r\nRunning Instances: `8`\r\nMongoDB in ReplicaSet mode, running on same machine.\r\nDeployment Method: tar\r\nNode version: `v8.9.4`\r\nActive Users: `55194`\r\n\r\n4 instances crashed during last 8 hours with:\r\n`FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory`\r\n\r\nSimilar issue reported earlier in #5577 \r\n### Steps to Reproduce:\r\nRun for few hours\r\n\r\n### Expected behavior:\r\nInstances will be still running\r\n\r\n### Actual behavior:\r\nThey aren't\r\n\r\n### Potential workaround:\r\nAdding: `--max_old_space_size=3072`.\r\nIf that's valid one it should be documented.\r\nI'll let you know about stability with above settings when I gather some more data (i.e. keep it running for 48 hours or so)\r\n\r\n### Relevant logs:\r\n###### Case 1\r\n```\r\nSecurity context: 0x2a311eea5ee1 <JSObject>\r\n    1: from [buffer.js:~175] [pc=0x25299f456fb](this=0x31c374a361f1 <JSFunction Buffer (sfi = 0x2a311eeffea1)>,value=0x10130daaed21 <Very long string[39941709]>,encodingOrOffset=0x2a311eeb58b9 <String[4]: utf8>,length=0x5ccfe282311 <undefined>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0x2529920a9a8](this=0x10130daaedf1 <Buffer map = 0xce0c2a18db1>,arg=0x10130daaed21 <Very long str...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x25298c36b87\r\n```\r\n###### Case 2\r\n```\r\nSecurity context: 0x1831f10a5ee1 <JSObject>\r\n    1: new constructor(aka Buffer) [buffer.js:~147] [pc=0x1f9d890e62c2](this=0x24f4cf124919 <Buffer map = 0x300d4b518e09>,arg=0x24f4cf12d289 <Very long string[40092386]>,encodingOrOffset=0x1831f10b58b9 <String[4]: utf8>,length=0x1c329dd02311 <undefined>)\r\n    2: arguments adaptor frame: 2->3\r\n    5: frame [/home/chat/Rocket.Chat/programs/server/npm/node_modules/meteor/ddp-server/node_modules/webso...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x1f9d88fde027\r\n```\r\n###### Case 3\r\n```\r\nSecurity context: 0x23f71b0a5ee1 <JSObject>\r\n    1: from [buffer.js:~175] [pc=0xd472d85bcdb](this=0x7a117d361f1 <JSFunction Buffer (sfi = 0x23f71b0ffea1)>,value=0x1213cbdc2db9 <Very long string[40092386]>,encodingOrOffset=0x23f71b0b58b9 <String[4]: utf8>,length=0x3b3002102311 <undefined>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0xd472cec37a8](this=0x1213cbdc2e89 <Buffer map = 0x7e331b98db1>,arg=0x1213cbdc2db9 <Very long str...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0xd472c7d06a7\r\n```\r\n###### Case 4\r\n```\r\nSecurity context: 0x3f088e0a5ee1 <JSObject>\r\n    1: fromString(aka fromString) [buffer.js:~298] [pc=0x7034792dd99](this=0x2fccc1182311 <undefined>,string=0x39c7323fdd59 <Very long string[39757999]>,encoding=0x3f088e0b58b9 <String[4]: utf8>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0x7034918abc5](this=0x39c7323fd751 <Buffer map = 0x10d695198db1>,arg=0x39c7323fdd59 <Very long string[39757999]>,encodingOrOffset=0x3f088e0b58b9 <...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x70346e9e307\r\n```\r\n###### Case 5\r\n```\r\nSecurity context: 0x3f812d425ee1 <JSObject>\r\n    1: from [buffer.js:~175] [pc=0x2b8da6d8f93b](this=0x1e38cd9361f1 <JSFunction Buffer (sfi = 0x3f812d47fea1)>,value=0x2c0c40bcc389 <Very long string[39376574]>,encodingOrOffset=0x3f812d4358b9 <String[4]: utf8>,length=0xbedd5782311 <undefined>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0x2b8da5687228](this=0x2c0c40bcc459 <Buffer map = 0x359483198e09>,arg=0x2c0c40bcc389 <Very long ...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x2b8da580a387\r\n```\r\n###### Case 6\r\n```\r\nSecurity context: 0x738df1a5ee1 <JSObject>\r\n    1: fromString(aka fromString) [buffer.js:~298] [pc=0x3881f376f3f9](this=0x313f4a482311 <undefined>,string=0x255f2a0acd51 <Very long string[39537164]>,encoding=0x738df1b58b9 <String[4]: utf8>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0x3881f34586a5](this=0x255f2a0aced1 <Buffer map = 0x35d47a98e09>,arg=0x255f2a0acd51 <Very long string[39537164]>,encodingOrOffset=0x738df1b58b9 <St...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x3881f2d3e327\r\n```\r\n###### Case 7\r\n```\r\nSecurity context: 0x2f66610a5ee1 <JSObject>\r\n    1: from [buffer.js:~175] [pc=0x2dc5b7d0a13b](this=0xad15d2361f1 <JSFunction Buffer (sfi = 0x2f66610ffea1)>,value=0x7f6fb9ca549 <Very long string[38856534]>,encodingOrOffset=0x2f66610b58b9 <String[4]: utf8>,length=0x2cea62582311 <undefined>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0x2dc5b7f75e48](this=0x7f6fb9ca021 <Buffer map = 0x31bd56b98e09>,arg=0x7f6fb9ca549 <Very long str...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0x2dc5b7cb2627\r\n```\r\n###### Case 8\r\n```\r\nSecurity context: 0xf268ad25ee1 <JSObject>\r\n    1: from [buffer.js:~175] [pc=0xe046c3305db](this=0x232eda1b61f1 <JSFunction Buffer (sfi = 0xf268ad7fea1)>,value=0x3ae59f69e8a1 <Very long string[39079419]>,encodingOrOffset=0xf268ad358b9 <String[4]: utf8>,length=0x1accf2102311 <undefined>)\r\n    2: new constructor(aka Buffer) [buffer.js:~147] [pc=0xe046c249788](this=0x3ae59f69e971 <Buffer map = 0x113892098db1>,arg=0x3ae59f69e8a1 <Very long stri...\r\n\r\nFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory\r\n 1: node::Abort() [node]\r\n 2: 0x121a2cc [node]\r\n 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]\r\n 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]\r\n 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]\r\n 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]\r\n 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]\r\n 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]\r\n 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [node]\r\n10: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [node]\r\n11: 0x123efe4 [node]\r\n12: 0xe046c208be7\r\n```"},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/422005752","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/9652#issuecomment-422005752","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/9652","id":422005752,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjAwNTc1Mg==","user":{"login":"localguru","id":8544984,"node_id":"MDQ6VXNlcjg1NDQ5ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8544984?v=4","gravatar_id":"","url":"https://api.github.com/users/localguru","html_url":"https://github.com/localguru","followers_url":"https://api.github.com/users/localguru/followers","following_url":"https://api.github.com/users/localguru/following{/other_user}","gists_url":"https://api.github.com/users/localguru/gists{/gist_id}","starred_url":"https://api.github.com/users/localguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/localguru/subscriptions","organizations_url":"https://api.github.com/users/localguru/orgs","repos_url":"https://api.github.com/users/localguru/repos","events_url":"https://api.github.com/users/localguru/events{/privacy}","received_events_url":"https://api.github.com/users/localguru/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T13:01:25Z","updated_at":"2018-09-17T13:01:25Z","author_association":"NONE","body":"Got this error too when building the bundle. Anything new on this?\r\n"}}
{"actor":{"display_login":"localguru"}}