ヘルス チェック: オープンなファイルの制限
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
問題
オープンなファイルの制限についてのヘルス チェックはプロセスを実行している Jira について、オペレーティング システム上のオープンなファイルの最大数と現在のオープンなファイルの記述子を問い合わせます。その後、合計に対する割合を計算し、その割合に応じて警告または重大なアラートを送信します。
File descriptors are used by *nix (Unix-like) operating systems to handle access to files. There are limits put in place by the operating system, and if processes try to exceed those limits they will be refused access to additional descriptors. This will impact JIRA's operation.
影響
現在実行中の Jira プロセスで、許可されるファイル記述子の最大数を超過しようとすると、クリティカルな失敗が発生し、主要なオペレーションの続行に失敗します。これを修正する唯一の方法は Jira インスタンスの再起動です。
結果の確認
結果 | 意味 |
|---|---|
最大の <オープンなファイルの最大数> について <オープンなファイルの数> があります。これは許容される制限内です。 | The JIRA process is using less than 70% of the maximum open file descriptors. |
最大の <オープンなファイルの最大数> について <オープンなファイルの数> があります。これは制限に近づいており、制限を超過するとクリティカルな失敗が発生します。 | The JIRA process is using 70% or higher of the maximum open file descriptors. |
There are '<num open files>' open files out of the maximum, '<max open files>'. This is critically close to the limit, and should be fixed immediately. | The JIRA instance is using 90% or higher of the maximum open file descriptors. |
ソリューション
Increasing the ulimit for the current JIRA application session will temporarily resolve the issue:
These changes will only work on installation that uses built in initd script for starting Jira. For installations that use custom build service for systemd (latest versions of linux OS-es) changes will need to be applied directly in that systemd service configuration in the form of:
[Service]
LimitNOFILE=20000
If the
$JIRA_HOME/caches/indexesfolder is mounted over NFS move it to a local mount (i.e. storage on the same server as the JIRA instance). NFS is not supported as per our JIRA application Supported Platforms and will cause this problem to occur at a much higher frequency.Stop the JIRA application.
Edit
$JIRA_INSTALL/bin/setenv.shto include the following at the top of the file:/usr/bin/ulimit -n 16384これにより、Jira アプリケーションが開始されるたびにこの値が設定されます。ただし、Jira アプリケーションのアップグレードを行う際は手動の移行が必要です。
Start your JIRA application.
The changes can be verified by running
/proc/<pid>/limitswhere <pid> is the application process ID.
To permanently apply the resolution, this needs to be configured on a per OS basis and can be done by consulting the operating system documentation on how to do so - if using Ubuntu we have instructions in Too many open files error in Jira server.
この内容はお役に立ちましたか?