"OutOfMemoryError Java heap space" エラーによって Confluence がクラッシュする
プラットフォームについて: 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 は除く
If Confluence is currently crashing: First enable heap dump on OOM so the next crash captures diagnostic data. Add these JVM args: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<path>. Without a heap dump, root cause analysis is much harder.
問題
Confluence がハングしたり、予期せぬ挙動をしたりする。
atlassian-confluence.log に次のようなエラー メッセージが記録される。
java.lang.OutOfMemoryError: Java heap space診断
Configure Java to produce a heap dump when it throws an OutOfMemoryError. Heap dumps can be used to determine what was in memory, identify memory leaks, and determine which system components are over-consuming memory. To generate a heap dump upon encountering an OutOfMemoryError, add the following arguments to your Confluence application, as detailed in the Configuring System Properties document: '-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<heap_dump_file_path>'.
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<heap_dump_file_path>
Generating a heap dump will create a file that is the same size as your JVM heap, so if you have allocated 2 GB to your JVM's maximum heap size, the heap dump will be 2 GB.
このファイルを作成するため、<heap_dump_file_path> で定義されたドライブまたはディレクトリに十分な領域があることを確認します。
Also, we do not recommend this setting for heaps larger than 2gb, unless it is specifically instructed by Atlassian Support for troubleshooting a specific problem.
原因
Java ヒープ スペース割り当てが超過されています。これは、アプリケーション内のメモリ リーク、または通常の使用でより多くのメモリが必要になったために発生します。
いくつかの既知の原因があります。
The XML Backup is one known memory hog. Check Cannot create or restore XML backup due to OutOfMemory errors in Confluence Data Center.
Heavy usage of the Office Connector or large office files can cause Out Of Memory Errors, for example, CONF-17113.
HSQLDB (評価用データベース) の使用はメモリの問題を発生させる可能性があります。
Upgrading Confluence from a version pre-3.5 to a version 3.5 or above, if Confluence was already close to using the maximum heap space, as Confluence's memory use increased by about 250 MB with version 3.5.
Common root causes
症状 | 考えられる原因 | 次のステップ |
|---|---|---|
OOM during page export/PDF generation | Large page or attachment | Increase Xmx temporarily; identify the offending page |
OOM during search or reindex | Index buffer too small | Increase Xmx; rebuild index if needed |
OOM under normal load | Memory leak (often Marketplace app) | Capture heap dump, analyze with MAT/VisualVM |
OOM after upgrade | Increased memory requirements in new version | Check release notes; increase Xmx |
ソリューション
If you're using the XML backup, disable it and use the Production Backup Strategy. Check Cannot create or restore XML backup due to OutOfMemory errors in Confluence Data Center for more information.
Confluence をアップグレードします。アトラシアンでは OutOfMemory エラーの根本原因の修正に引き続き取り組んでいます。
If you're using the evaluation database, Migrate to a Production Database.
If your usage patterns have increased, you likely just need to tweak your memory settings. See Fix Out of Memory errors by Increasing Available Memory. When increasing heap space, pay attention to Garbage Collection performance.
認証
After increasing heap or fixing the root cause:
Monitor JVM heap usage via JConsole or VisualVM during normal load
Confirm no OOM errors appear in
atlassian-confluence.logover 24-48 hoursVerify GC pauses are within acceptable thresholds
If using a Marketplace app, monitor its memory footprint specifically
When this won't help
This article does not cover:
OutOfMemoryError types other than "Java heap space" (e.g. PermGen, Metaspace)
Server hardware OOM (kernel killing Java process) — see system memory KB
Confluence Cloud — Atlassian-managed JVM, no customer tuning available
関連記事
この内容はお役に立ちましたか?