Discourse-docker の unicorn 実行時のメモリ問題

最新バージョンの discourse-docker で Docker を実行しています。メモリは 2GB、unicorn スレッドは 3 です。
以下のように多くのログエラーが発生しています。

I, [2019-12-17T22:44:47.722151 #19487]  INFO -- : listening on addr=0.0.0.0:3000 fd=13
I, [2019-12-17T22:44:53.036892 #19487]  INFO -- : master process ready
I, [2019-12-17T22:44:55.704154 #19587]  INFO -- : worker=0 ready
I, [2019-12-17T22:44:56.644984 #19594]  INFO -- : worker=1 ready
I, [2019-12-17T22:44:57.595814 #19601]  INFO -- : worker=2 ready
I, [2019-12-18T05:12:51.517167 #19487]  INFO -- : reaped #<Process::Status: pid 19587 exit 0> worker=0
I, [2019-12-18T05:12:52.533342 #19487]  INFO -- : reaped #<Process::Status: pid 19594 exit 0> worker=1
Detected dead worker 19563, restarting...
I, [2019-12-18T05:12:53.551518 #19487]  INFO -- : reaped #<Process::Status: pid 19601 exit 0> worker=2
I, [2019-12-18T05:12:59.062671 #11689]  INFO -- : worker=1 ready
I, [2019-12-18T05:12:59.063307 #11680]  INFO -- : worker=0 ready
I, [2019-12-18T05:12:59.360555 #11706]  INFO -- : worker=2 ready
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
WARNING: V8 isolate was forked, it can not be disposed and memory will not be reclaimed till the Ruby process exits.
D, [2019-12-18T05:13:23.583306 #19487] DEBUG -- : waiting 16.0s after suspend/hibernation
I, [2019-12-18T05:13:44.194692 #19487]  INFO -- : reaped #<Process::Status: pid 11680 exit 0> worker=0
I, [2019-12-18T05:13:44.194960 #19487]  INFO -- : reaped #<Process::Status: pid 11689 exit 0> worker=1
I, [2019-12-18T05:13:44.195054 #19487]  INFO -- : reaped #<Process::Status: pid 11706 exit 0> worker=2
I, [2019-12-18T05:13:44.195120 #19487]  INFO -- : master complete
I, [2019-12-18T05:13:45.760881 #11795]  INFO -- : Refreshing Gem list

同じ問題に直面している方はいますか?

非公式のプラグインをインストールしていますか?またはサーバーで他の何かを実行していますか?2GBあれば十分のはずですが…

返信ありがとうございます。サーバーは Sidekiq と Discourse のみを実行しています。

以下のコマンドを実行していただけますか:

cd /var/discourse
./discourse-doctor

そして、その URL を共有してください。

@Falco
ありがとうございます。以下がドクター診断の結果です:

DISCOURSE DOCTOR 2019年12月20日 03:42:31 UTC
OS: Linux int-communityweb-01w.our-internal-domain 3.10.0-1062.7.1.el7.x86_64 #1 SMP 2019年12月2日 17:33:29 UTC x86_64 x86_64 x86_64 GNU/Linux


YML=web_only.yml
containers/web_only.yml を発見しました

==================== YML 設定 ====================
DISCOURSE_HOSTNAME=int-communityweb-vip.our-internal-domain
SMTP_ADDRESS=our_smtp_server # (必須)
DEVELOPER_EMAILS=REDACTED 
SMTP_PASSWORD=REDACTED  (オプション)
SMTP_PORT=25 # (オプション)
SMTP_USER_NAME=# (オプション)
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED 

==================== DOCKER 情報 ====================
DOCKER バージョン: Docker version 17.05.0-ce, build 89658be

DOCKER プロセス(docker ps -a)

CONTAINER ID        IMAGE                                                                                                             COMMAND             CREATED             STATUS                    PORTS                NAMES
e6c7024d0d4b        artifacts.our-internal-domain:8080/image/community:99-2.0.20191013-2320-tests-passed-b6b05d3b48-2019-12-16_09-28   "/sbin/boot"        43 時間前        43 時間前               0.0.0.0:80->80/tcp   web_only
703de08548b0        artifacts.our-internal-domain:8080/image/community:90-2.0.20190625-0946-tests-passed-ac7d68a-2019-08-30_09-36      "/sbin/boot"        4 週間前         46 時間前に終了 (5)                        web_only_bak


Discourse コンテナ web_only は実行中です


==================== プラグイン ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://gitlab.our-internal-domain/community/community-sso-plugin.git
          - git clone https://gitlab.our-internal-domain/community/community-ads-plugin.git
          - git clone  --branch upgarde-newrelic-gem https://gitlab.our-internal-domain/community/community-newrelic-plugin.git

警告:
公式以外のプラグインがインストールされているようです。
問題が発生している場合は、これらを無効にして再ビルドを試してください。

公式プラグインのリストについては、https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb を参照してください。

========================================
int-communityweb-vip.our-internal-domain での Discourse バージョン: Discourse 2.4.0.beta8 
localhost での Discourse バージョン: Discourse 2.4.0.beta8 


==================== メモリ情報 ====================
OS: Linux
RAM (MB): 1882

              total        used        free      shared  buff/cache   available
Mem:           1838        1340          66           7         430         306
Swap:          3071         388        2683

==================== ディスク容量チェック ====================
---------- OS ディスク容量 ----------
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/vg00-root   19G   15G  3.3G  82% /
/dev/mapper/vg00-root   19G   15G  3.3G  82% /var/lib/docker/overlay
/dev/mapper/vg00-root   19G   15G  3.3G  82% /

---------- コンテナディスク容量 ----------


==================== ディスク情報 ====================

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 セクタ
Units = 1 * 512 = 512 bytes のセクタ
セクタサイズ(論理/物理): 512 bytes / 512 bytes
I/O サイズ(最小/最適): 512 bytes / 512 bytes
ディスクラベルタイプ: dos
ディスク識別子: 0x0005c8ec

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1050623      524288   83  Linux
/dev/sda2         1050624    16777215     7863296   8e  Linux LVM
/dev/sdimage        16777216    41943039    12582912   8e  Linux LVM

Disk /dev/mapper/vg00-root: 19.9 GB, 19851640832 bytes, 38772736 セクタ
Units = 1 * 512 = 512 bytes のセクタ
セクタサイズ(論理/物理): 512 bytes / 512 bytes
I/O サイズ(最小/最適): 512 bytes / 512 bytes


Disk /dev/mapper/vg00-swap: 1073 MB, 1073741824 bytes, 2097152 セクタ
Units = 1 * 512 = 512 bytes のセクタ
セクタサイズ(論理/物理): 512 bytes / 512 bytes
I/O サイズ(最小/最適): 512 bytes / 512 bytes

==================== ディスク情報終了 ====================

==================== メールテスト ====================
確実なテストを行うには、http://www.mail-tester.com/ からメールアドレスを取得してください。
メールテストはスキップされました。

==================== 完了! ====================
  1. 含まれているカーネルはだいぶ古いですが、もう少し現代的な環境で実行することは可能ですか?

  2. Docker のバージョンもかなり古いです。サポートされているバージョンに更新することはできますか?

  3. web_only コンテナを実行していますが、これはスタンドアロン型よりもさらに少ないメモリを使用します。とはいえ、多数のカスタムプラグインを実行しており、それらが過剰なメモリを割り当てている可能性があります。

  4. OS の swapiness を確認してください。設定が低すぎる可能性があります。

  5. Unicorn が終了しています。詳細なログがないと原因を特定するのは難しいですが… カスタムプラグインが外部システムに対してインラインでリクエストを送信していますか?単にタイムアウトしているだけかもしれません。

ここには単純なインストールとはかけ離れたあまりにも多くの変数があります。まずはそれらを減らすことをお勧めします。

@Falco ありがとうございます。これについてメモリを追加します。カーネルと Docker のアップグレードに関連する件については、SE チームと相談して決定します。
メリークリスマス。:dizzy: