Troubleshooting (GC Overhead Limit) SoapUI project over Hudson (CIS)

Summary of the Error I am gonna troubleshoot here:

java.lang.OutOfMemoryError: GC overhead limit exceeded

A couple of weeks ago I was assigned the task of migrating Hudson to a new machine with the latest version of Hudson. Installed Hudson (version 1.361) deployed over Tomcat 6, configured several Jobs including:

  • 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 running a bigger job I was getting the following error:

java.lang.OutOfMemoryError: GC overhead limit exceeded

I tried running the tests multiple times just to make sure if it might work fine but no luck. Searched the web, people suggested try increasing the memory in the JAVA_OPTS option, I did that but got the same error, similarly tried increasing the Xmx memory of Ant, SoapUI.sh, Catalina.sh, Java… but it didn’t cure.

Later after a lot of efforts of debugging the issue, I found out the cause that build file of CIS is run by testrunner.sh which was lacking memory and throwing the exception on executing larger test suites, I just increased the -Xmx memory in testrunner.sh file of SoapUI in the bin folder and executed the job successfully.

It was so easy to do, but sometimes we miss basic things as we never think in those directions.

But anyways it was Happy Testing in the end :)

Follow

Get every new post delivered to your Inbox.