앱 재빌드 중 멈춤

이 가이드를 사용하여 새로운 Droplet으로 이사를 진행 중입니다.

리빌드(rebuild) 단계까지 왔고, 잠시 동안은 순조롭게 진행되다가 아래 지점에 도달했습니다:

110:M 21 Dec 2023 17:29:25.029 * Background saving started by pid 2933
2933:C 21 Dec 2023 17:29:25.583 * DB saved on disk
2933:C 21 Dec 2023 17:29:25.590 * Fork CoW for RDB: current 1 MB, peak 1 MB, average 0 MB
110:M 21 Dec 2023 17:29:25.632 * Background saving terminated with success

이 문제를 언급하는 이전 게시물을 살펴보니, 대부분의 제안은 VPS를 재부팅하고 명령어를 다시 실행하는 것이었습니다. 이렇게 해봤지만 문제가 해결되지 않았습니다. 현재까지 리빌드를 세 번 실행했으며 결과는 다음과 같습니다:

  1. 재부팅 후 응답이 없음
  2. 약 1시간 대기 후 마침내 다음 상황이 발생함
110:M 21 Dec 2023 17:29:25.022 * 100 changes in 300 seconds. Saving...
110:M 21 Dec 2023 17:29:25.029 * Background saving started by pid 2933
2933:C 21 Dec 2023 17:29:25.583 * DB saved on disk
2933:C 21 Dec 2023 17:29:25.590 * Fork CoW for RDB: current 1 MB, peak 1 MB, average 0 MB
110:M 21 Dec 2023 17:29:25.632 * Background saving terminated with success
^[[HKilled
error Command failed with exit code 137.
I, [2023-12-21T18:19:23.241028 #1]  INFO -- : yarn run v1.22.19
$ /var/www/discourse/app/assets/javascripts/node_modules/.bin/ember build
Building
Environment: development
WARNING: ember-test-selectors: You are using an unsupported ember-cli-babel version. data-test properties are not automatically stripped from your JS code.
building...
...[ConfigLoader]
...[Babel: discourse-widget-hbs > applyPatches]
...[Babel: ember-source > applyPatches]
...[ember.js]
...[Babel: discourse-common > applyPatches]
...[Babel: truth-helpers > applyPatches]
...[Babel: ember-tracked-storage-polyfill > applyPatches]
...[Babel: @ember/render-modifiers > applyPatches]
...[Babel: @ember/test-helpers > applyPatches]
...[Babel: @ember/test-waiters > applyPatches]
...[Babel: @embroider/util > applyPatches]
...[Babel: @glimmer/component > applyPatches]
...[Babel: dialog-holder > applyPatches]
...[Babel: ember-this-fallback > applyPatches]
...[Babel: ember-buffered-proxy > applyPatches]
...[Babel: ember-exam > applyPatches]
...[Babel: ember-functions-as-helper-polyfill > applyPatches]
...[Babel: ember-resize-observer-service > applyPatches]
...[Babel: float-kit > applyPatches]
...[Babel: select-kit > applyPatches]
...[@embroider/compat/app]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
...[@embroider/webpack]
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I, [2023-12-21T18:19:23.255055 #1]  INFO -- : Terminating async processes
I, [2023-12-21T18:19:23.255857 #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: 41
2023-12-21 18:19:23.256 UTC [41] LOG:  received fast shutdown request
I, [2023-12-21T18:19:23.257064 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 110
110:signal-handler (1703182763) Received SIGTERM scheduling shutdown...
2023-12-21 18:19:23.265 UTC [41] LOG:  aborting any active transactions
110:M 21 Dec 2023 18:19:23.269 # User requested shutdown...
110:M 21 Dec 2023 18:19:23.270 * Saving the final RDB snapshot before exiting.
2023-12-21 18:19:23.284 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2023-12-21 18:19:23.285 UTC [45] LOG:  shutting down
2023-12-21 18:19:23.375 UTC [41] LOG:  database system is shut down
110:M 21 Dec 2023 18:19:23.638 * DB saved on disk
110:M 21 Dec 2023 18:19:23.639 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 2840 exit 137>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 137
** 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.
75e3ba35e779508ddbe9e536babf134fb2f100a50e05c38c1f26555d76801c98
  1. 약 1시간 실행된 후 broken pipe(깨진 파이프) 오류가 발생하여 연결이 끊어짐

이제 어떻게 진행해야 할지 어떤 단서가 있을까요?

이 Droplet은 2GB RAM / 50GB 디스크 용량으로 Ubuntu 23.10 x64를 실행하고 있습니다. rsync 명령어는 예상대로 실행된 것 같습니다.

감사합니다!

오류 137은 메모리 부족으로 보입니다. 스왑 공간이 충분히 설정되어 있나요?

아, 그게 문제였구나. 스왑을 설정하지 않았었어. 고마워, 이제 다 해결됐어.