Confluence怎么扩展内存

发布时间:2021-11-17 17:57:29 作者:小新
来源:亿速云 阅读:278

这篇文章主要介绍了Confluence怎么扩展内存,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

背景:

Confluence 有一天晚上突然就不能访问了,前端页面提示502 。然后抓紧重启服务,一切恢复正常。第二天开始查看日志记录,翻看logs/catalina.out中的日志记录如下:

03-Dec-2018 01:03:05.107 WARNING [main] org.apache.catalina.core.StandardServer.await StandardServer.await: Invalid command '' received
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000007a7400000, 83886080, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 83886080 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/atlassian/confluence/bin/hs_err_pid2084.log03-Dec-2018 19:45:07.267 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.

说是要让去/opt/atlassian/confluence/bin/hs_err_pid2084.log 下查看具体的错误内容,具体内容如下:

```

# 摘录了一部分日志记录:

# 部分一:

# Possible reasons:

#   The system is out of physical RAM or swap space

#   In 32 bit mode, the process size limit was hit

# Possible solutions:

#   Reduce memory load on the system

#   Increase physical memory or swap space

#   Check if swap backing store is full

#   Use 64 bit Java on a 64 bit OS

#   Decrease Java heap size (-Xmx/-Xms)

#   Decrease number of Java threads

#   Decrease Java thread stack sizes (-Xss)

#   Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

#

#  Out of Memory Error (os_linux.cpp:2627), pid=2084, tid=0x00007f89ff5d7700

# 部分二:

Memory: 4k page, physical 16333788k(136664k free), swap 0k(0k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.112-b15) for linux-amd64 JRE (1.8.0_112-b15), built on Sep 22 2016 21:10:53 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

time: Mon Dec  3 19:37:07 2018

```

从第二个日志记录里,我们能看到提示内存不足的可能原因及处理方法。

解决办法:

先升级Confluence所在机器的物理内存。

重点

然后修改Confluence的VM中的内存配置,修改方法如下: 第一步:

关闭Confluence 和 Nginx 服务(如果有)

第二步:

找到Confluence安装路径下的/confluence/bin/setenv.sh 文件,修改文件中的如图选项:

修改前一定要备份文件

Confluence怎么扩展内存

主要修改Xmx后的数字,根据你的Confluence版本不同,这个选项有略微不同,截图里显示了不同版本对应的配置选项。我的是Confluence6.1 ,所以我的配置是:CATALINA_OPTS="-Xms4096m -Xmx16384m -XX:+UseG1GC ${CATALINA_OPTS}"

这个Xmx 后的数字修改规则为,物理内存的一般,可以略微调大一点

第三步:

启动Nginx 和 Confluence 服务,如果服务正常,就可以使用了

检验方式可以在Confluence的后台【一般配置】系统信息里的Java 栈堆 看到内存扩展后的数据。也可以ps aux | grep java

提醒:

内存不足可能会引发Confluence一系列的问题,建议有问题,先排查内存问题

感谢你能够认真阅读完这篇文章,希望小编分享的“Confluence怎么扩展内存”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!

推荐阅读:
  1. confluence使用问题总结
  2. confluence 安装

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

confluence

上一篇:怎么解决IE7和IE8兼容性问题

下一篇:jquery如何获取tr里面有几个td

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》