Top of the day, good people!
I use Hippo CMS that uses cargo maven plugin to run the app in Tomcat. Since recently, due to the increased size of the repository and an update to new version, my trusted command
mvn -Pcargo.run -Drepo.path=storage
Started throwing out of memory error.
Exception in thread "jackrabbit-pool-12" java.lang.OutOfMemoryError: GC overhead limit exceeded
...
[INFO] [talledLocalContainer] Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
So I've added the following to the cargo section of my pom.xml:
...
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<properties>
<cargo.jvmargs>-Xmx2048m -Xms500m</cargo.jvmargs>
...
And that has sorted out the OOM error.
But now my debugging in IntelliJj doesn't work.
I did some digging and it looks like with these options JVM forks and hence debugging is no longer can be hooked in.
I tried to run mvn with the likes of -DforkCount=0, but that doesnt seem to work either.
Is there a work around to get cargo run with added memory and in a debug mode? I use
mvn -T4 -Pcargo.run -Dcargo.debug.suspend=n -Dcargo.debug.address=5005 -Drepo.path=storage -Djrebel
to enable debugging.
Many thanks,
Nestor