<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to increase java heap space</title><link>https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space</link><description>&lt;p&gt;I get the following exception when I try to upload a file (33MB) with a webservice in ivy 4.3.21:&lt;/p&gt;
&lt;p&gt;org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at devd3.d3wservicegen.D3WServiceStub.ImportDocument(D3WServiceStub.java:14234)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at ch.ivyteam.ivy.webservice.restricted.exec.axis2.WebServiceCallAxis2.invokeMethod(WebServiceCallAxis2.java:687)
    at ch.ivyteam.ivy.webservice.restricted.exec.axis2.WebServiceCallAxis2.executeCall(WebServiceCallAxis2.java:454)
    at ch.ivyteam.ivy.webservice.restricted.exec.axis2.WebServiceCallAxis2.perform(WebServiceCallAxis2.java:258)
    at ch.ivyteam.ivy.webservice.restricted.execution.WebServiceCallBean.executeAxisWebServiceCall(WebServiceCallBean.java:239)
    at ch.ivyteam.ivy.webservice.restricted.execution.WebServiceCallBean.perform(WebServiceCallBean.java:355)
    at ch.ivyteam.ivy.process.engine.internal.io.extension.ProcessExtensionJob.run(ProcessExtensionJob.java:298)
    at ch.ivyteam.ivy.process.engine.internal.io.extension.ProcessExtensionThread.runAsSystem(ProcessExtensionThread.java:271)
    at ch.ivyteam.ivy.process.engine.internal.io.extension.ProcessExtensionThread$1.call(ProcessExtensionThread.java:219)
    at ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1404)
    at ch.ivyteam.ivy.process.engine.internal.io.extension.ProcessExtensionThread.run(ProcessExtensionThread.java:214)&lt;/p&gt;
&lt;p&gt;Is there a simple way to increase the java heap space or is there any other solution available to upload bigger files? A file with 24MB can be uploaded without any problem. The webservice would support MTOM and excepts the file data as an javax.activation.DataHandler object.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 16 May 2014 16:39:55 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space/703</link><description>&lt;p&gt;&lt;strong&gt;Since 7.4&lt;/strong&gt; you can also set the heap size on a Axon.ivy Engine by using &lt;a href="https://developer.axonivy.com/doc/latest/engine-guide/configuration/files/jvm-options.html"&gt;jvm.options&lt;/a&gt; files &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before 7.4&lt;/strong&gt;  you need to use the &lt;em&gt;.ilc file for windows &lt;a href="https://developer.axonivy.com/doc/latest/EngineGuideHtml/misc.html#misc-toolreference-ilc"&gt;this chapter&lt;/a&gt; and the &lt;/em&gt;.conf file for linux &lt;a href="https://developer.axonivy.com/doc/latest/EngineGuideHtml/misc.html#misc-toolreference-unix"&gt;this chapter&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Fri, 16 May 2014 16:39:55 -0400</pubDate><guid>https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space/703</guid></item><item><title>Answer by Daniel Oechslin</title><link>https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space/702</link><description>&lt;p&gt;To increasing the default HeapSize of your underlaying tomcat you can modify the designer.ini file and add&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-Xmx1024m
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For a windows-ivy-server you can set a new environment variable. And use the 'set environment' file to 'setenv.bat' in your 'ivyserverfolder/bin'.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;set JAVA_OPTS=-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you use Linux export the line in your 'setenv.sh' placed in your 'ivyserverfolder\bin'.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not simply set it to your max memory. The error may be in your code. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Fri, 16 May 2014 14:01:55 -0400</pubDate><guid>https://answers.axonivy.com/questions/701/how-to-increase-java-heap-space/702</guid></item></channel></rss>