Bitbucket Server-JIRA integration is slow after Bitbucket Server upgrade using Oracle

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

 

症状

Integration with JIRA becomes very slow after a Bitbucket Server upgrade. 

診断

This can happen in Bitbucket Server installations that use Oracle with automatic statistics collection disabled.

Using a browser or an HTTP client (such as curl) invoke the following URL:

http://[BITBUCKET_DOMAIN]/rest/remote-link-aggregation/latest/aggregation?globalId=[JIRA_ISSUE]

The invocation can take several minutes to complete or even timeout (specially if Bitbucket Server is running behind a proxy).

原因

Oracle automatic statistics collection is disabled. This can cause Oracle to use the wrong index for the integration queries. 

Note automatic statistics collections is enabled by default.

Verify that automatic statistics collections is disabled:

  • Using Oracle visual tools check the section "Automated Maintenance Tasks" and make sure "Optimizer statistics gathering" is disabled.
  • Or run the following queries to confirm that automatic statistics collections is disabled and when it was last run:
クエリ
SELECT client_name, status FROM dba_autotask_operation;
SELECT * FROM dba_autotask_schedule;
SELECT task_name, status, to_char(last_good_date, 'YYYY-MM-DD HH24:MI:SS') last_good_date, last_good_duration FROM dba_autotask_task WHERE client_name = 'auto optimizer stats collection'; 

ソリューション

Calculate new statistics and possibly enable automatic statistics collection as suggested by Oracle's documentation.

Example of statistics collection instruction:

exec dbms_stats.gather_database_stats(estimate_percent => 100, method_opt => 'for all columns size auto',options => 'Gather' ,cascade => true, degree => 4);

Note this can be a very time and cpu consuming operation.

To enable automatic statistics collection refer to Oracle's documentation.

最終更新日: 2016 年 2 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.