Summary of the Error I am gonna troubleshoot here:
java.lang.OutOfMemoryError: GC overhead limit exceeded
Arggg..!!! A couple of weeks ago I was assigned the task of migrating Hudson to a newer (better) machine and rather install the newer version of Hudson on the new machine. I started the work and installed Hudson (CIS, version 1.361) deployed over Tomcat 6, configured several Jobs which included:
- Checkout, Compile and Run JUnit Test Cases on the Build and record them using PMD, FindBugs and Cobertura Code Coverage Test Reports.
- Configured WS (Web Services) Tests using SoapUI.
The first job of compilation and executing JUnit tests was running fine but,
when I was running a bigger job of WS, and exception was being often seen in the logs (console output) “java.lang.OutOfMemoryError: GC overhead limit exceeded“, I tried running the tests multiple times but no luck. looked for it over the web, people suggested try increasing memory in the JAVA_OPTS option, I did but got the same error, similarly tried increasing the Xmx memory of ant, soapui.sh, catalina.sh, java… but still got no luck.
Then I thought about the complete process, and from where the execution of job originates, that was done by Ant which was traversing the buildForCIS.xml file which was using SoapUI 3.5 which uses testrunner.sh to run the tests…….. SO THAT WAS IT !!!, testrunner.sh, I just increased the -Xmx option in testrunner.sh file of SoapUI in the bin folder, and everything started to work fine. No more java.lang.OutOfMemoryError: GC overhead limit exceeded errors.
Happy Testing !!!