97008 48403
+91 40-27177600


How to handle JSON transformer java heap error in Mule ESB


From the technical center of excellence of Massil Technologies, our technology leaders make it easy to understand the complex situations you come across in Mule ESB from the experience of Massil Technologies to have countered them in their experience of working on client projects in real time. This blog talks about handling JSON transformer java heap error in Mule ESB. This blog is a part of series of blogs being authored and published by Massil Technologies for the benefit of the IT community globally.

In one of our working scenarios, we have been using an object to JSON transformer. We have noticed the payload to the object on JSON transformer is huge which resulted in JAVA heap error. We had futile efforts of using data weave to convert the payload to JSON. It has been very challenging to find a fix. We are listing out the best fix that worked for us below out of many ways we tried.


In DataWeave use, mode=”immediate” try to change to ‘mode=” deferred” this allows DataWeave output to remain outside of the heap.

Increase DataWeave memory by adding com.mulesoft.dw.buffersiz= ${Increase value as required by your case (bytes) } in system Property ( Default value 1572864)

If you are running 3.8.3v version or lower, DataWeave limitation to handle up to 2GB of data, but there is no limitation of data from 3.8.4v onwards

Hence, we have gone through the step by step process to depict the way Massil Technologies team has addressed the above-mentioned scenario. Hope this article from Massil Technologies was useful for you. If you have any further queries on this topic, please reach out to info@massil.tech.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Get in touch with us

Scroll to top