0
votes

I am using object to json transformer. The payload to the object to json transformer is huge. I am getting Java Heap error. I tried using data weave to convert the payload to JSON .Even then i am getting Java heap error..I tried increasing the permsize and maxpermsize vm arguments but still i am getting the error. How can i fix this issue?

3

3 Answers

0
votes

Add system property com.mulesoft.dw.buffersize=545454545. This will buffer the payload to file system. You can set it while starting server as VM argument or in case of standalone installation add in wrapper.conf file ot in mule app properties. You can decide size dependent on your payload.

Hope this helps.

0
votes

Try out the below options in dataweave

1)By Default Dataweave use mode="immediate" try to change to 'mode="deferred"' this allows DataWeave output to remain outside of the heap.

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

As mentioned in the doc, If you are runnning 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 on wards

Refer this page for more clear details :https://docs.mulesoft.com/mule-user-guide/v/3.8/dataweave-memory-management

0
votes

Add system property com.mulesoft.dw.buffersize=545454545