java.lang.OutOfMemoryError: Java heap space error?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 -XXermSize=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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In windows, I changed it to 12GB out of 16GB RAM.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, just making sure I understand which OS and memory configuration we're troubleshooting there. Can you open Task Manager on windows and watch memory increase as it goes? Running hundreds of tests should not necessarily cause this sort of problem. One thing that comes to mind is to ensure you've set your memory optimizations per this article.
I would set every test case's settings to a Max Results of 0 and to discard successful test steps results to save memory.
Another piece you can try is to put in a groovy script test step / assertion that does the following code. This will force ReadyAPI to do a garbage collection. This has helped me in some instances when ReadyAPI starts using a lot of memory.
System.gc();
Unfortunately, without knowing what your tests encompass or the size of data in the request and/or response, it is difficult to troubleshoot. One option might be to open a support ticket, especially if the software continues to crash with that error.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
And thank you everyone who participated in the discussion.
@NewAutoTester, were the suggestions above helpful? If your question was answered, could you please click the Accept as Solution button below the reply that helped you?
Or, in case you created a support case, is it possible for you to share the updates with the Community here?
Thank you in advance!
Olga Terentieva
SmartBear Assistant Community Manager

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »