1

My Hippo application is failing mostly when making a connection with my database with GC overhead limit exceeded and sometimes with below error.

javax.jcr.RepositoryException: unchecked exception: java.lang.OutOfMemoryError: Java heap space

I tried to clean up my backend as much as possible. I know that the garbage collector is taking an excessive amount of time and recovers very little memory in each run. So I need to update my heap size and also can use -XX:-UseGCOverheadLimit to turn that off.

But how to do that on a Hippo application? Where and how to add heap parameters(Xms & Xmx)?

FYI. M using hippo's inbuilt tomcat server.

Any help would be much appreciated. Thanks.

Rak
  • 21
  • 3

3 Answers3

1

Yup.

I updated the pom with

<cargo.jvmargs>-agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=${cargo.debug.suspend}
-noverify ${javaagent} ${cargo.jvm.args}</cargo.jvmargs>

And ran the application with mvn -P cargo.run -Dcargo.jvmargs="-Xmx8192m"

Rak
  • 21
  • 3
0

It looks like one thing you could do is increase your Bundle cache. This will increase your heap size as well.

Also, take a look at this similar answer.

John Kane
  • 4,383
  • 1
  • 24
  • 42
  • Yup, I tried increasing it but it didn't work. I am trying to setup an external tomcat on my server but what are the values for the below fields in context.xml Parameter name=“repository-address” value=“rmi://127.0.0.1:1099/hipporepository” override=“false”/> Parameter name=“repository-directory” value="${catalina.base}/…/repository" override=“false”/>* Parameter name=“check-username” value=“liveuser” override=“false”/>* – Rak Jul 09 '18 at 21:48
  • I don't think the bundle cache is the problem here, but the heap memory. – Jasper Floor Jul 10 '18 at 08:27
0

You can give extra memory using cargo.jvmargs in the cargo maven profile. In your top level pom find the cargo profile. In the properties element you can do:

<cargo.jvmargs>    
-agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent} ${cargo.jvm.args}</cargo.jvmargs>

These are the arguments that cargo will get and use for tomcat. This is for local development only of course.

https://www.onehippo.org/library/development/run-and-develop-with-cargo.html

Jasper Floor
  • 553
  • 3
  • 6
  • For servers or a separate local tomcat see https://www.onehippo.org/library/enterprise/installation-and-configuration/linux-installation-manual.html. – Jasper Floor Jul 10 '18 at 08:28