Ask a Question

java.lang.OutOfMemoryError: Java heap space error?

NewAutoTester
Contributor

java.lang.OutOfMemoryError: Java heap space error?

Hi,

I still get the java.lang.OutOfMemoryError: Java heap space even after updating JVM Options. 

export _JAVA_OPTIONS="-Xms4096m -Xmx4096m -XX:NewSize=256m -XX:MaxNewSize=356m -XXSmiley TongueermSize=256m -XX:MaxPermSize=356m"

 

ERROR:

Scenario Outline: Check for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Given Prepare a transaction request for "xxxxxxxxxxxxxxxx" with setup user role as "xxxxxxxxx" transaction # StepDefinition.prepare_Transaction_Request(String,String)
java.lang.OutOfMemoryError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:158)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:423)
at java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:593)
at com.eviware.soapui.impl.support.loadsave.CompositeProjects.c(CompositeProjects.java:498)
at com.eviware.soapui.impl.support.loadsave.CompositeProjects.loadCompositeProjectFile(CompositeProjects.java:199)
at com.eviware.soapui.impl.support.wsdl.UrlWsdlLoaderPro.a(UrlWsdlLoaderPro.java:35)
at com.eviware.soapui.impl.support.wsdl.UrlWsdlLoaderPro.handleFile(UrlWsdlLoaderPro.java:27)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlClientLoader.load(UrlClientLoader.java:149)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlClientLoader.load(UrlClientLoader.java:127)
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlClientLoader.load(UrlClientLoader.java:118)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.b(WsdlProjectPro.java:629)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.loadProject(WsdlProjectPro.java:421)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:314)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:293)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:288)
at com.eviware.soapui.impl.wsdl.WsdlProjectPro.<init>(WsdlProjectPro.java:208)
at com.stepDefinition.prepare_Transaction_Request(StepDefinition.java:76)
at ?.Given Prepare a transaction request for "xxxxxxxxxxxxxxxx" with setup user role as "xxxxxxxxx" transaction(xxxxxxxxx.feature:20)
Caused by: java.lang.OutOfMemoryError: Java heap space

 

Could you please help.

12 REPLIES 12
groovyguy
Champion Level 0

How much RAM does the machine running your tests have?




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!

We run the project in 2 machines below are the RAM available in them.

 

RAM:

Linux Machine - 4 GB

Windows Machine - 16 GB

jhanzeb1
Frequent Contributor

I've seen this error before, I used to get this error while dealing with data-driven tests that required a lot of test data from an oracle DB in a short space of time. 

 

What's the size of your XML file please? if it's over 20mb, I'd recommend splitting it into two and run the tests seperately. This was the case in free soapUI version. What SoapUI version are you using?

 

 

groovyguy
Champion Level 0

@NewAutoTester: Is this error coming from the Linux or Windows machine?

 

On your Linux machine, setting the memory values to 4096 means you are allowing ReadyAPI to use ALL of your available RAM. It will not be able to do that, since the OS and other applications will need to use some RAM as well.

 

On the Windows machine, I'd say you could safely set that value to 12288 instead of 4096 to see if it fares any better. That would be 75% of your 16GB of RAM which might work better for you. My testing machine has 32GB of RAM and I set my memory to 24576. 

 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!

Hi,

I am using ReadyAPI 2.3.0 version, I have around 800+  (165 test passed) scenarios to test in 48 ReadyAPI test suites.  I get heap space error during 166th test.

 

 

Hi,

Using ReadyAPI 2.3.0 version, we have around 800+  (165 test passed) scenarios to test in 48 ReadyAPI test suites. We have composite project so all small xml. Getting heap space error during 166th test.

 

 

Still need to know which machine you are seeing these errors on, per my last response in this thread. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!

Error is seen in both the machines (Linux and Windows). In windows, after using 75% of the total RAM, it was able to run 165 test.

On the windows machine, are you still set to 4096 for the vm options file? Or did you adjust that?




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
cancel
Showing results for 
Search instead for 
Did you mean: