Closed edschnir closed 8 years ago
Give your JVM a bit more PermGen space, or move to newer JVM. This is described at https://github.com/tomaswolf/gerrit-gitblit-plugin#installation .
Thank you for your prompt answer. We are using JDK 1.7.0_67 As per your instructions I have added the following to teh Gerrit container configuration:
-XX:PermSize=512m -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
And here are all the data of that Java process:
-bash-4.1$ ps -ef | grep Gerrit
gerrit2 2500 23868 0 01:06 pts/1 00:00:00 grep Gerrit
gerrit2 29640 1 28 00:57 pts/0 00:02:21 GerritCodeReview -Dcom.sun.management.jmxremote.port=49999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:PermSize=512m -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Xmx42g -jar /local/gerrit/bin/gerrit.war daemon -d /local/gerrit --run-id=1471247866.29590
-bash-4.1$ /local/java/jdk1.7.0_67/bin/jinfo -flag PermSize 29640
-XX:PermSize=536870912
-bash-4.1$ /local/java/jdk1.7.0_67/bin/jinfo 29640
Attaching to process ID 29640, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.65-b04
Java System Properties:
com.sun.management.jmxremote.authenticate = false
java.runtime.name = Java(TM) SE Runtime Environment
java.vm.version = 24.65-b04
sun.boot.library.path = /local/java/jdk1.7.0_67/jre/lib/amd64
java.vendor.url = http://java.oracle.com/
java.vm.vendor = Oracle Corporation
path.separator = :
java.rmi.server.randomIDs = true
file.encoding.pkg = sun.io
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
sun.os.patch.level = unknown
sun.java.launcher = SUN_STANDARD
user.country = US
user.dir = /local/gerrit
java.vm.specification.name = Java Virtual Machine Specification
com.sun.management.jmxremote.port = 49999
org.apache.sshd.common.io.IoServiceFactoryFactory = org.apache.sshd.common.io.mina.MinaServiceFactoryFactory
java.runtime.version = 1.7.0_67-b01
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
os.arch = amd64
java.endorsed.dirs = /local/java/jdk1.7.0_67/jre/lib/endorsed
line.separator =
java.io.tmpdir = /tmp
java.vm.specification.vendor = Oracle Corporation
os.name = Linux
sun.jnu.encoding = UTF-8
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.specification.name = Java Platform API Specification
java.class.version = 51.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 2.6.32-504.12.2.el6.x86_64
user.home = /home/gerrit2
user.timezone = America/Los_Angeles
java.awt.printerjob = sun.print.PSPrinterJob
file.encoding = UTF-8
java.specification.version = 1.7
user.name = gerrit2
java.class.path = /local/gerrit/bin/gerrit.war
java.vm.specification.version = 1.7
sun.arch.data.model = 64
sun.java.command = /local/gerrit/bin/gerrit.war daemon -d /local/gerrit --run-id=1471247866.29590
java.home = /local/java/jdk1.7.0_67/jre
user.language = en
java.specification.vendor = Oracle Corporation
awt.toolkit = sun.awt.X11.XToolkit
com.sun.management.jmxremote.ssl = false
java.vm.info = mixed mode
java.version = 1.7.0_67
java.ext.dirs = /local/java/jdk1.7.0_67/jre/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path = /local/java/jdk1.7.0_67/jre/lib/resources.jar:/local/java/jdk1.7.0_67/jre/lib/rt.jar:/local/java/jdk1.7.0_67/jre/lib/sunrsasign.jar:/local/java/jdk1.7.0_67/jre/lib/jsse.jar:/local/java/jdk1.7.0_67/jre/lib/jce.jar:/local/java/jdk1.7.0_67/jre/lib/charsets.jar:/local/java/jdk1.7.0_67/jre/lib/jfr.jar:/local/java/jdk1.7.0_67/jre/classes
java.awt.headless = true
java.vendor = Oracle Corporation
file.separator = /
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding = UnicodeLittle
sun.cpu.endian = little
sun.cpu.isalist =
VM Flags:
-Dcom.sun.management.jmxremote.port=49999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:PermSize=512m -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Xmx42g
Did that solve the problem?
Seems like yes. It have been running without any memory problem since then. Thank you.
I am using Gerrit 2.12,2 and GitBlit plugin 2.171.1.2 and after a while of running getting the following error:
And here is a more complete error:
With the following configuration (gitblit.properties at $GERRIT_HOME/etc):
Also added the following arguments to Gerrit Java in order to allow GC and unload of PermGen: