`
xgbjmxn
  • 浏览: 261062 次
  • 性别: Icon_minigender_1
  • 来自: 新乡
社区版块
存档分类
最新评论

'java.lang.OutOfMemoryError PermGen Space' 错误导致JIRA崩溃

阅读更多
'java.lang.OutOfMemoryError PermGen Space' 错误导致JIRA崩溃

(from  http://www.confluence.cn/pages/viewpage.action?pageId=8388674)

    Added by Wei Jing, last edited by Wei Jing on 2011-02-16  (view change)
    show comment

现象

JIRA 崩溃. 日志中出现下面错误:
java.lang.OutOfMemoryError: PermGen space
原因

错误信息 java.lang.OutOfMemoryError: PermGen space 表明加载的类文件已经超过了Java的内存永久保存区域。大量的插件会消耗更多的PermGen空间。当调用相当多的类时发生这个错误。
解决方案
不要在一个Tomcat容器内部署多个 Atlassian 应用程序

Atlassian不建议在同一个Tomcat容器中部署多个Atlassian应用程序。我们没有在这种配置环境下进行过测试,任何应用程序的升级(哪怕是小版本升级)都有可能会导致故障产生。在这种不建议的配置环境下,我们已经接到了一些错误报告(查看 FAQ 了解详细内容)。
我们强烈建议不要在一个Tomcat容器内部署多套Atlassian应用程序还有很多实际应用上的原因。首先,你需要在升级任何一个应用程序时停止Tomcat服务,其次一旦任一个应用程序发生崩溃,Tomcat容器内的其他应用程序也可能会受到影响。.

要避免发生这个错误, 按照以下步骤操作:
Linux

    确保 JAVA_HOME 设置正确. 请参见 安装Java。 这一点非常重要,否则设置无法生效。 请参考 增加固定存储器无效。
    打开 <jira-install>/bin/setenv.sh.
    编辑下面参数值:
    JIRA_MAX_PERM_SIZE=256m

Windows 服务

参考 增加JIRA内存。如果你使用的是Windows服务,请特别注意设置参数的位置, 并按照介绍更改 PermGen Space 参数 而不是堆栈空间参数。
Windows .bat 文件

    确保 JAVA_HOME 设置正确。 参考 安装Java
    打开 <jira-install>/bin/setenv.bat.
    编辑下面参考值:
    JIRA_MAX_PERM_SIZE=256m
    如果设置无效, 请参考 增加固定存储器无效。
--------------------------------------------------------------
Increasing Permanent Generation Memory Does Not Work
Skip to end of metadata

    Added by Morgana Spindler [Atlassian], last edited by Hercules on Jan 09, 2011  (view change)
    show comment

Comment: Migration of unmigrated content due to installation of a new plugin
Go to start of metadata
Symptoms

Changing JIRA_MAX_PERM_SIZE parameter in setenv.sh file does not have any effect on Permanent Generation Memory available in JIRA.
Cause

The setenv.sh file have a script (permgen.sh) that check if a IBM VM is being used instead of a Sun VM.
If a "IBM" string is NOT found in $JAVA_HOME the parameter JAVA_PERMGEN_SUPPORTED is set to true, otherwise, is set to false preventing PermGen memory settings to be included in the JAVA_OPTS.
Workaround

Change the line:

to:
Resolution

This problem is due to an incorrectly set JAVA_HOME directory. See Installing Java(http://confluence.atlassian.com/display/JIRA/Installing+Java). The root cause is due to a bug in JIRA, addressed in JRA-21159.


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics