# 메모리 부족으로 인한 OOM Killer 발생으로 부트스트랩 실패

**URL:** https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141
**Category:** Bug
**Created:** [4월 26, 2021, 1:16오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141 "2021-04-26T13:16:42Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 1:16오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/1 "2021-04-26T13:16:42Z")

</div>

여러분,

./launcher rebuild app 명령어로 Discourse를 업데이트하려고 합니다. 약 1년 동안 잘 작동했고, 필요할 때마다 2~4주 간격으로 업데이트를 진행해 왔습니다.

사용 중인 OS는 Ubuntu 18.04.5 LTS입니다.

```
***@*** :~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

```

오늘은 다음과 같은 오류로 중단되었습니다:

```
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 726 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
db6d1b1dd685de69942a3df05c9cbd622860faaa286b042635878519d5b69b7b
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

해당 메시지 위의 첫 번째 오류는 다음과 같습니다:

```
<--- JS stacktrace --->

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 0xa04200 node::Abort() [node]
 2: 0x94e4e9 node::FatalError(char const*, char const*) [node]
 3: 0xb7978e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb79b07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xd34395 [node]
 6: 0xd46c01 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 7: 0xd0c472 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
 8: 0xd086c2 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
 9: 0xd08774 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [node]
10: 0xf4ef4b v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::Allocate(v8::internal::Isolate*, int, v8::internal::AllocationType) [node]
11: 0xf4f0df v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::Rehash(v8::internal::Isolate*, v8::internal::Handle<v8::internal::OrderedHashSet>, int) [node]
12: 0x103eb98 v8::internal::Runtime_SetGrow(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x1401219 [node]
Aborted (core dumped)
rake aborted!
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/www/discourse/public/assets/discourse/tests/test_helper-a9cbc4e1abdd1f2e9afced86d051cbd63c2e224dafe782533646a01592cc1f42.js
/var/www/discourse/lib/tasks/assets.rake:290:in `size'
/var/www/discourse/lib/tasks/assets.rake:290:in `block (4 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `block in concurrent?'
/var/www/discourse/lib/tasks/assets.rake:281:in `block (3 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:272:in `each'
/var/www/discourse/lib/tasks/assets.rake:272:in `block (2 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `concurrent?'
/var/www/discourse/lib/tasks/assets.rake:269:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I, [2021-04-26T13:10:13.996101 #1] INFO -- : Downloading MaxMindDB...
Compressing Javascript and Generating Source Maps

I, [2021-04-26T13:10:14.018697 #1] INFO -- : Terminating async processes
I, [2021-04-26T13:10:14.020721 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 55
I, [2021-04-26T13:10:14.022854 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 172
172:signal-handler (1619442614) Received SIGTERM scheduling shutdown...
2021-04-26 13:10:14.023 UTC [55] LOG: received fast shutdown request
2021-04-26 13:10:14.030 UTC [55] LOG: aborting any active transactions
2021-04-26 13:10:14.043 UTC [55] LOG: background worker "logical replication launcher" (PID 64) exited with exit code 1
2021-04-26 13:10:14.045 UTC [55] LOG: shutting down
2021-04-26 13:10:14.073 UTC [55] LOG: database system is shut down
172:M 26 Apr 2021 13:10:14.122 # User requested shutdown...
172:M 26 Apr 2021 13:10:14.123 * Saving the final RDB snapshot before exiting.
172:M 26 Apr 2021 13:10:14.270 * DB saved on disk
172:M 26 Apr 2021 13:10:14.271 # Redis is now ready to exit, bye bye...

```

그 이후로 Discourse가 실행되지 않습니다. 서버를 재부팅해야만 Discourse가 다시 실행됩니다. 하지만 그러면 다시 rebuild app을 실행할 수 없고, 동일한 오류가 발생합니다.

함께 이 문제를 해결해 주실 수 있을까요?

감사합니다

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [4월 26, 2021, 1:57오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/2 "2021-04-26T13:57:18Z")

</div>

부트스트랩 중 서버의 메모리가 부족합니다. `free -m` 명령의 출력을 공유해 주시겠어요?

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 2:00오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/3 "2021-04-26T14:00:41Z")

</div>

```
**@** :~# free -m
              total used free shared buff/cache available
Mem: 985 777 70 49 136 44
Swap: 2047 228 1819

```

음, 재부팅 후에도 메모리가 부족해지는 것에 대해 의아합니다. 지난 업데이트 이후로 추가로 설치한 것도 없는데 말이죠.

---

<div class="post-metadata">

### Author: ![Andrey\_Rechkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrey_rechkov/32/218256_2.png) [@Andrey\_Rechkov](https://meta.discourse.org/u/Andrey_Rechkov)
#### Post date: [4월 26, 2021, 3:18오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/4 "2021-04-26T15:18:20Z")

</div>

저도 같은 문제를 겪고 있습니다. nodejs에 메모리가 부족합니다.  
“export NODE\_OPTIONS=”–max\_old\_space\_size=4096 --some\_other\_option""을 사용했지만, 효과가 없습니다.

---

<div class="post-metadata">

### Author: ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)
#### Post date: [4월 26, 2021, 3:38오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/5 "2021-04-26T15:38:53Z")

</div>

재빌드를 시도할 때에도 동일한 스택 트레이스가 발생했습니다. 개발 및 테스트용으로 사용하고 있는 비교적 새로운 설치 환경이라, 아직 여유 공간이 충분할 것 같은데요?

**OS** : Ubuntu 20.04.1 LTS  
**free -m 출력:**

```plaintext
root@discourse-test-environment:/var/discourse# free -m
              total used free shared buff/cache available
Mem: 981 136 581 0 263 698
Swap: 2047 113 1934

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 26, 2021, 5:22오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/6 "2021-04-26T17:22:02Z")

</div>

최소 1GB보다 약간 부족한 상태입니다. 스왑 공간을 조금 늘려볼 수는 있지만, 더 많은 RAM을 권장합니다.

> [@weallwegot](#):
>
> 상대적으로 새로 설치해서 개발과 테스트용으로만 사용 중이라 아직 공간이 꽤 남아 있을 것 같은데?

해당 오류가 발생한다면 더 많은 RAM이 필요합니다(혹은 스왑 공간도 필요할 수 있지만, RAM이 더 좋습니다).

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 5:57오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/7 "2021-04-26T17:57:59Z")

</div>

좋아요, 그런데 그 새로운 동작의 이유는 무엇일 수 있을까요? 해당 설정으로 1년 이상 잘 작동해 왔거든요. 과거와 비교했을 때 지금 Discourse가 다른 점은 무엇인가요?

---

<div class="post-metadata">

### Author: ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)
#### Post date: [4월 26, 2021, 6:27오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/8 "2021-04-26T18:27:03Z")

</div>

추천해 줘서 고마워. 보통 5달러짜리 DigitalOcean 드롭렛에서 기본 2GB 스왑 파일로 잘 굴러가던 것 같아서 약간 의아하긴 해. 최신 업데이트나 다른 이유로 이런 일이 더 자주 발생하는지 지켜볼게.

어쨌든 [별도의 파일로 스왑을 훨씬 더 많이(4GB) 추가](https://askubuntu.com/questions/927854/how-do-i-increase-the-size-of-swapfile-without-removing-it-in-the-terminal)했는데도 업그레이드는 여전히 실패했어. RAM 증설이 필수적인 건가? 현재 인스턴스에 토픽 1개, 사용자 1명만 있는데도 이런 일이 일어나니 예상 밖이었어. 또, Discourse가 스왑을 사용하도록 설정해야 하는지, 아니면 기본적으로 접근 가능한지 궁금해.

새로운 `free -m` 출력 결과는 다음과 같아.

```plaintext
              total used free shared buff/cache available
Mem: 981 138 576 0 266 703
Swap: 6143 109 6034

```

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 6:28오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/9 "2021-04-26T18:28:55Z")

</div>

네, 저도 1 vCPU와 1GB vRAM이 있는 Digital Ocean Droplet을 쓰고 있어요 🙂

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 6:39오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/10 "2021-04-26T18:39:59Z")

</div>

스왑 메모리를 3GB로 늘렸는데, 여전히 같은 오류가 발생합니다.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [4월 26, 2021, 6:49오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/11 "2021-04-26T18:49:09Z")

</div>

저는 테스트 인스턴스를 RAM+스왑 2.5GiB만으로 재구축할 수 있습니다. 하지만 사용자의 인스턴스는 그보다 더 많은 메모리를 필요로 할 수 있습니다.

플러그인이 설치되어 있나요? 컴파일 과정에서 특정 플러그인이 막대한 메모리를 사용하도록 만들고 있을 것으로 의심됩니다.

플러그인 없이 재구축해 보시고 문제가 해결되는지 확인해 주시겠습니까?

---

<div class="post-metadata">

### Author: ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)
#### Post date: [4월 26, 2021, 7:19오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/12 "2021-04-26T19:19:19Z")

</div>

답변 주셔서 감사합니다.

> [@supermathie](#):
>
> 저는 RAM+스왑 2.5GiB만으로 테스트 인스턴스를 재구축할 수 있었습니다.

호기심이 생겨 질문하는데, RAM과 스왑의 비율이 어떻게 되나요? 그리고 두 항목 모두에서 ‘사용 가능’ 공간만 계산하신 건가요, 아니면 인스턴스의 총 스왑 파일 크기 + 총 RAM을 기준으로 하셨나요?

> [@supermathie](#):
>
> 플러그인을 설치하고 계신가요?

아, 맞다 - [Discourse OpenID Connect Authentication 플러그인](https://meta.discourse.org/t/openid-connect-authentication-plugin/103632)을 설치하려고 했다는 점을 언급하는 것을 잊고 있었습니다.

현재 [Data Explorer 플러그인](https://meta.discourse.org/t/data-explorer-plugin/32566)도 이미 설치되어 있습니다.

* * *

- [Data Explorer](https://meta.discourse.org/t/32566?silent=true) + Docker Manager만 설치하고 다시 시도해 보았지만 실패했고, 이전에 공유한 것과 동일한 스택 트레이스가 나타났습니다.
- 플러그인 없이(Docker Manager만) 다시 시도해 보았지만 재구성이 여전히 작동하지 않았습니다.

* * *

ConnectID 플러그인을 추가하려고 시도한 것 외에는 원래 설치 이후 아무것도 변경하지 않았으므로 계속 살펴볼 예정입니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 26, 2021, 7:20오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/13 "2021-04-26T19:20:23Z")

</div>

[Trouble with `tests/test_helper`?](https://meta.discourse.org/t/trouble-with-tests-test-helper/188185/2/) 에서 관련이 있을 수 있는 문제를 겪고 있습니다.

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [4월 26, 2021, 7:21오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/14 "2021-04-26T19:21:42Z")

</div>

플러그인을 전혀 사용하지 않고 앱을 다시 빌드해 보았습니다. 변화가 없습니다. 동일한 오류가 발생합니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 26, 2021, 6:43오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/15 "2021-04-26T18:43:56Z")

</div>

이 부분을 이해하지 못했지만 버그인 것 같습니다. 이 사이트에서 부트스트랩(bootstrap)을 수행하고 있습니다. 비표준 플러그인은 사용하지 않았습니다. 에셋을 한 버킷에서 다른 버킷으로 옮겼을 뿐이며, 현재는 모두 정상 작동합니다. UX에 표시되지 않도록 `DISCOURSE_S3_UPLOAD_BUCKET`을 ENV에 추가하기 위해 한 번 더 리빌드(rebuild)를 하던 중이었습니다. 처음 실패했을 때 해당 줄을 주석 처리하고, 3일 전에 정상 작동했던 것과 동일한 설정으로 다시 시도했습니다.

```plaintext

Done compressing embed-application-9cef8308c816fc1d83137e63d6c556c6cc2b68fe2b6e5ce16cca6766ba2c0ae4.js : 0.17 secs

844614.350963717 Compressing: discourse/tests/test_helper-8590b31b8e73c4172aeea4a4a6bd1930ccbce2547a20d831a30d457ba092a631.js
terser '/var/www/discourse/public/assets/discourse/tests/_test_helper-8590b31b8e73c4172aeea4a4a6bd1930ccbce2547a20d831a30d457ba092a631.js' -m -c -o '/var/www/discourse/public/assets/discourse/tests/test_helper-8590b31b8e73c4172aeea4a4a6bd1930ccbce2547a20d831a30d457ba092a631.js' --source-map "base='/var/www/discourse/public/assets/discourse/tests',root='/assets/discourse/tests',url='https://CORRECT_CDN_ADDRESS.b-cdn.net/assets/discourse/tests/test_helper-8590b31b8e73c4172aeea4a4a6bd1930ccbce2547a20d831a30d457ba092a631.js.map'"
Killed
rake aborted!
Errno::ENOENT: No such file or directory @ rb_file_s_size - /var/www/discourse/public/assets/discourse/tests/test_helper-8590b31b8e73c4172aeea4a4a6bd1930ccbce2547a20d831a30d457ba092a631.js
/var/www/discourse/lib/tasks/assets.rake:290:in `size'
/var/www/discourse/lib/tasks/assets.rake:290:in `block (4 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `block in concurrent?'
/var/www/discourse/lib/tasks/assets.rake:281:in `block (3 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:272:in `each'
/var/www/discourse/lib/tasks/assets.rake:272:in `block (2 levels) in <main>'
/var/www/discourse/lib/tasks/assets.rake:181:in `concurrent?'
/var/www/discourse/lib/tasks/assets.rake:269:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I, [2021-04-26T18:38:36.072881 #1] INFO -- : Updating Discourse Loading Slider...
Downloading MaxMindDB...
Compressing Javascript and Generating Source Maps

```

CDN URL에 문제가 있는 것은 아닌지 궁금했습니다. 하지만 위의 모든 줄에는 해당 URL이 포함되어 있었고 정상적으로 작동했습니다.

이것은 테마에 잘못된 CSS가 있다는 뜻일까요? 그렇다면 큰일입니다. 마스터 테마에는 일부 CSS만 존재합니다. 또한 다음 컴포넌트도 있습니다: `https://github.com/discourse/DiscoTOC.git` 및 `https://github.com/davidtaylorhq/discourse-loading-slider.git`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [4월 26, 2021, 7:02오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/16 "2021-04-26T19:02:59Z")

</div>

이것이 최소 크기의 드롭렛인가요? 해당 파일은 terser가 압축하기가 좀 어려운 것 같네요. 메모리 압력을 많이 발생시키거든요.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 26, 2021, 7:05오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/17 "2021-04-26T19:05:17Z")

</div>

아. 의외로 작네요. 몇 년 전에 여러분이 설정해 주셨던 사이트인 것 같아요 (여러분의 인프라가 아닌 곳에서 사이트를 운영하던 시절이었죠).

```plaintext
root@community:/var/discourse# free -h
              total used free shared buff/cache available
Mem: 1.9G 1.2G 101M 259M 655M 354M
Swap: 2.0G 1.2G 773M

```

아, 알겠습니다. 2GB의 DO 드롭렛이네요, 그리고 컨트롤 패널에 접근할 수 있습니다. 4GB로 업그레이드하고 AMD로 이동을 요청하겠습니다.

수정: 하지만 이 작업이 단순히 그 파일 하나를 압축하는 것이라면, 2GB 드롭렛으로도 충분하지 않을까요?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [4월 26, 2021, 7:16오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/18 "2021-04-26T19:16:52Z")

</div>

이 테스트 헬퍼 파일은 압축에 무리가 갑니다.

- UglifyJS는 이를 압축하는 데 1.5GB의 RAM을 사용합니다.

- Terser는 약 1GB가 조금 넘는 메모리를 사용합니다. 40초가 걸립니다. 참고로 동일한 서버에서 Ember+jQuery는 8초가 걸립니다 😱

@eviltrout 이 파일을 프로덕션 환경에 포함해야 할까요?

아, @Osama 의 이 변경 사항에서 비롯된 것 같습니다.

> <https://github.com/discourse/discourse/pull/12815>
>
> This PR allows site admins to run theme tests in production via a new \`/theme-qu…nit\` route. When you visit \`/theme-qunit\`, you'll see a list of the themes/components installed on your site that have tests, and from there you can select a theme or component that you run its tests.
> 
> We also have a new rake task \`themes:install\_and\_test\` that installs a list of themes/components on a temporary database and runs the tests of the themes/components that are installed. This rake task can be useful when upgrading/deploying a Discourse instance to make sure that the installed themes/components are compatible with the new Discourse version being deployed, and if the tests fail you can abort the build/deploy process so you don't end up with a broken site.

```plaintext
-rw-r--r-- 1 discourse discourse 14M Apr 26 19:13 _test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js
-rw-r--r-- 1 discourse discourse 6.6M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js
-rw-r--r-- 1 discourse discourse 1.1M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.br
-rw-r--r-- 1 discourse discourse 1.5M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.gz
-rw-r--r-- 1 discourse discourse 5.7M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.map

```

---

<div class="post-metadata">

### Author: ![weallwegot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/weallwegot/32/124753_2.png) [@weallwegot](https://meta.discourse.org/u/weallwegot)
#### Post date: [4월 26, 2021, 7:48오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/20 "2021-04-26T19:48:23Z")

</div>

> [@pfaffman](#):
>
> 이것은 테마에 오류가 있는 CSS가 있다는 뜻인가요?

한 가지 참고 자료를 더 추가하자면, 두 개의 테마 구성 요소를 제거한 후에도 여전히 재빌드 실패가 발생하고 있습니다. 현재 기본 Light 테마만 사용 중입니다.

> [@Falco](#):
>
> ```plaintext
> -rw-r--r-- 1 discourse discourse 14M Apr 26 19:13 _test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js
> -rw-r--r-- 1 discourse discourse 6.6M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js
> -rw-r--r-- 1 discourse discourse 1.1M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.br
> -rw-r--r-- 1 discourse discourse 1.5M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.gz
> -rw-r--r-- 1 discourse discourse 5.7M Apr 26 19:14 test_helper-f4c4b5bf0657eab910d85b9a65b4bddbbbe2ce2ba603b17fe11b3d633d324e34.js.map
> 
> ```

이 출력은 어디에서 나온 것인가요? 제 쪽에서도 조금 확인하고 디버깅해 보고 싶습니다. `./launcher rebuild app` 명령어의 verbose 옵션 같은 것인가요?

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [4월 26, 2021, 7:49오후 UTC](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141/21 "2021-04-26T19:49:36Z")

</div>

이 문제를 제대로 수정하는 데 시간이 조금 걸릴 것 같아서, 당분간 해당 변경 사항을 되돌릴 예정입니다.

[다음 페이지](https://meta.discourse.org/t/failed-to-bootstrap-due-to-out-of-memory-killer/188141.md?page=2)
