Users encountering intermittent issues with Jira macros
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
Users may encounter the error "Error rendering macro 'jira'" when trying to display Jira macros within Confluence pages. These errors are often transient, resolving themselves after a few minutes or hours.
環境
Confluence Data Center 7.x,
Confluence Data Center 8.x
診断
When the issue arises, you may notice an error message in the atlassian-confluence.log file. The error typically indicates issues related to pool size, active threads, and queued tasks. An example log entry is as follows:
2024-08-25 22:34:07,855 ERROR [http-nio-8080-exec-740] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: jira
-- url: /confluence/pages/viewpage.action | traceId: 6c5728dda552200f | userName: <username> | action: viewpage | page: <pageid>
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@a616946 rejected from java.util.concurrent.ThreadPoolExecutor@3e4f88f6[Running, pool size = 5, , active threads = 5, queued tasks = 1000, completed tasks = 1585899]
Error seen on Confluence UI.
.
原因
The error is primarily related to a performance bottleneck, not an integration issue between Jira and Confluence. Specifically, it pertains to the thread pool responsible for fetching data from Jira to render the Jira Issues macro. The error arises when there's an overwhelming number of requests within a short time frame.
Technical Explanation:
- Confluence uses a separate thread pool, known as the JIM Marshaller thread pool, to handle requests for rendering Jira Issues macros.
- In the given error, the line `pool size = 5, active threads = 5` indicates that all 5 threads are currently busy, while `queued tasks = 1000` shows that the queue is at its maximum capacity.
- Since the queue can hold up to 1000 tasks, any additional request gets rejected, leading to the error message.
ソリューション
To resolve this issue, consider the following steps:
1. Identify Potential Causes:
- Check if there are any scripts or automated processes running on this Confluence instance that pull data from Jira.
- Check any pages that might have more than 1000 Jira issues configured, which could be overwhelming the system.
2. Increase Thread Pool and Queue Size:
- If identifying the source of the high demand is not feasible, you can increase the thread pool size from 5 to 10 and the queue size from 1000 to 2000. This change will allow the system to handle more concurrent requests and queued tasks.
- To implement this solution, incorporate the following JVM startup parameters into the setenv.sh file and then restart the Confluence:
CATALINA_OPTS="-Dconfluence.jira.issues.executor.poolsize=10 ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.jira.issues.executor.queuesize=2000 ${CATALINA_OPTS}"