안녕하세요,
지난 몇 년간 OpenShift에서 자체 Discourse 인스턴스를 운영해 왔으며, 최근 몇 달간(대략 2026년 1월부터, Introducing pre-compiled JS assets for self-hosters 및 Introducing a new build system for plugins 에서 설명된 새로운 접근 방식과 거의 일치하는 시점) 다음과 같은 상황을 관찰했습니다:
빌드 시점에 에셋을 사전 컴파일할 때(bundle exec rake assets:precompile:build), 이 작업이 이제 폭발적으로 증가하여 20Gb 이상의 메모리를 소비합니다:
...
gem install prometheus_exporter -v 2.2.0 -i /var/www/discourse/plugins/discourse-prometheus/gems/3.4.7 --no-document --ignore-dependencies --no-user-install
Successfully installed prometheus_exporter-2.2.0
1 gem installed
Plugin name is 'msgraph-polling', but plugin directory is named 'msgraph-poll-discourse-plugin'
[assemble_ember_build] No existing build info file found.
Fetching and extracting https://get.discourse.org/discourse-assets/2026.5.0-latest-03484cbd/production.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 20.1M 100 20.1M 0 0 22.5M 0 --:--:-- --:--:-- --:--:-- 22.5M
Prebuilt assets downloaded and extracted successfully.
[assemble_ember_build] Reusing existing core ember build. All done.
Plugin name is 'msgraph-polling', but plugin directory is named 'msgraph-poll-discourse-plugin'
[Plugin::JsManager] Compiling 49 plugins...
# 여기서 오래 멈춤
메모리 사용량을 살펴보니 다음과 같습니다:
Every 1.0s: free -h webapp-test-discourse-689b5fcb4d-fd2dp-debug-b7nn2: Mon May 4 14:15:57 2026
total used free shared buff/cache available
Mem: 28Gi 26Gi 596Mi 524Mi 2.1Gi 1.7Gi
Swap: 0B 0B 0B
이전에는 비교적 빠르고 메모리 소비도 적었습니다.
CI=1 및 NODE_OPTIONS=”-–max-old-space-size=X”와 같은 환경 변수를 설정해 보았지만, 이 메모리 소비를 억제하는 데 도움이 되는 것 같지 않습니다.
누군가 동일한 문제에 직면한 적이 있으며, 그렇다면 어떻게 해결했는지 알려 주실 수 있을까요?
감사합니다!
Ismael