JIRA applications crash due to OutOfMemoryError PermGen space error

お困りですか?

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

コミュニティに質問

症状

JIRA applications crash. Errors in the logs appear as:

java.lang.OutOfMemoryError: PermGen space

原因

The error message java.lang.OutOfMemoryError: PermGen space means Java's fixed block for loading class files has been exceeded. Permanent Generation Memory, unlike Java heap space, is the memory allocation for the classes themselves as opposed to the objects created. There are 3 possible causes for this:

  1. The most common is that the addition of more plugins contributes to more consumption of PermGen space. The error occurs when enough classes are invoked. If this happens, the resolution below applies.
  2. There is also a known bug with JIRA 4.3.1 that can cause this error to occur on Windows Systems. Upgrading to the most recent JIRA application release will resolve that bug - please see Upgrading JIRA applications for information on how to upgrade.
  3. It could also happen if you try and run multiple Atlassian applications in a single Tomcat container. See:

    Do not deploy multiple Atlassian applications in a single Tomcat container

    Deploying multiple Atlassian applications in a single Tomcat container is not supported. We do not test this configuration and upgrading any of the applications (even for point releases) is likely to break it. There are also a number of known issues with this configuration (see this FAQfor more information).

    We also strongly recommend not deploying multiple Atlassian applications to a single Tomcat container for a number of practical reasons. Firstly, you must shut down Tomcat to upgrade any application and secondly, if one application crashes, the other applications running in that Tomcat container will be inaccessible.

    Finally, we recommend not deploying any other applications to the same Tomcat container that runs JIRA, especially if these other applications have large memory requirements or require additional libraries in Tomcat's lib subdirectory.

ソリューション

 

To avoid this in the future, follow these steps:

Linux

Linux の解説を詳しく見る
  1. Make sure $JAVA_HOME is set correctly as in Installing Java. This is important, or the setting won't work. See Increasing Permanent Generation Memory Does Not Work.
  2. Edit <jira-install>/bin/setenv.sh and modify the JIRA_MAX_PERM_SIZE value to be larger. It's recommended to increase by 128mb blocks, testing each increase. Setting a value too high can be just as problematic as one that is too low.

  3. Jira アプリケーションを再起動します。

Windows サービス

Expand to see Windows Service instructions
  1. Identify the name of the service that JIRA applications are installed as in Windows ( Control Panel > Administrative Tools > Services ):

    (info) In the above example, the SERVICENAME is: JIRA120312230938
  2. 「ファイルを指定して実行」で'cmd' を入力してエンターキーを押し、コマンド ウィンドウを開きます。
  3. cd to the bin subdirectory of your JIRA application installation directory (or the bin subdirectory of your Tomcat installation directory if your are running the JIRA WAR distribution).
    For Example:

    cd C:\Program Files\Atlassian\JIRA\bin
  4. For JIRA 5.1 or below run:

    tomcat6w //ES//%SERVICENAME%
    

    For JIRA 5.2 or above run:

    tomcat7w //ES//%SERVICENAME%

     

    (info) In the above example, it would be tomcat6w //ES//JIRA120312230938

  5. Java タブをクリックして、現在の起動オプション一覧を表示します。
  6. Scroll down in the "Java Options" pane and modify the -XX:MaxPermSize value to be larger. It's recommended to increase by 128mb blocks, testing each increase. Setting a value too high can be just as problematic as one that is too low.
  7. Jira アプリケーションを再起動します。

Windows (.batファイルから起動)

ここをクリックして展開...
  1. Make sure $JAVA_HOME is set correctly as in Installing Java. This is important, or the setting won't work. See Increasing Permanent Generation Memory Does Not Work.
  2. Edit <jira-install>/bin/setenv.bat and modify the JIRA_MAX_PERM_SIZE value to be larger. It's recommended to increase by 128mb blocks, testing each increase. Setting a value too high can be just as problematic as one that is too low.

  3. Jira アプリケーションを再起動します。

If this above does not resolve the problem, please see Increasing Permanent Generation Memory Does Not Work or raise a support issue on support.atlassian.com.

最終更新日 2016 年 3 月 30 日

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

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