Foren

GC overhead limit exceeded : Ubuntu Issue

thumbnail
Subhasis Roy, geändert vor 8 Jahren.

GC overhead limit exceeded : Ubuntu Issue

Expert Beiträge: 275 Beitrittsdatum: 20.01.12 Neueste Beiträge
Hi All,

I am facing one issue while deploying portlet in Liferay 6.2 GA4, in Ubuntu OS.

Error Log:


[C3P0PooledConnectionPoolManager[identityToken->UXnKjwk1]-HelperThread-#2,5,main]. Will attempt to reconstruct, but this might mean that something bad is happening.
java.lang.OutOfMemoryError: GC overhead limit exceeded
20:17:09,601 WARN  [C3P0PooledConnectionPoolManager[identityToken->6nWq57au]-HelperThread-#4][ThreadPoolAsynchronousRunner:701] An Error forced the closing of Thread[C3P0PooledConnectionPoolManager[identityToken->6nWq57au]-HelperThread-#4,5,main]. Will attempt to reconstruct, but this might mean that something bad is happening.
java.lang.OutOfMemoryError: GC overhead limit exceeded
	at com.mysql.jdbc.DatabaseMetaData.getInstance(DatabaseMetaData.java:662)
	at com.mysql.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:3209)
	at com.mysql.jdbc.ConnectionImpl.getMetaData(ConnectionImpl.java:3201)
	at com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnectionNoQuery(DefaultConnectionTester.java:197)
	at com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:74)
	at com.mchange.v2.c3p0.AbstractConnectionTester.activeCheckConnection(AbstractConnectionTester.java:79)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.testPooledConnection(C3P0PooledConnectionPool.java:503)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.testPooledConnection(C3P0PooledConnectionPool.java:463)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishIdleResource(C3P0PooledConnectionPool.java:435)
	at com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:2151)



Can any one please help me on this.
I have increased the space in the setenv.sh file. But still getting the error.
thumbnail
Subhasis Roy, geändert vor 8 Jahren.

[Resolved]: RE: GC overhead limit exceeded : Ubuntu Issue

Expert Beiträge: 275 Beitrittsdatum: 20.01.12 Neueste Beiträge
I am able to resolve it by adding the following in the setenv.sh file.
I have removed the existing "CATALINA_OPTS" entry and added the below "JAVA_OPTS" one.

In the below entry -
I have mentioned the "HeapDumpPath", "Xloggc", and other GC log related entries. This resolved the issue for me.

setenv.sh entry:

JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms2048m -Xmx3072m -XX:MaxPermSize=1024m -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$TOMCAT_HOME/log -Xloggc:$TOMCAT_HOME/log/tomcatGC.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -XX:ReservedCodeCacheSize=124M -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=6"