Maximum call stack size exceeded when generating xml file

I'm generating an XML file. All is going well (while debugging): non-persisitent objects are created, export to xml and also my activity ‘Download file’ seems to execute fine. The microflow comes to its end event. After a short period of 20 secs the stack size error is displayed in the console and the user gets an error. This is a client side error.  No problems occur with other xml files that are generated using the same proces but with less data. The largest file that is generated without problems is about 3.6 MB. Does anybody have a clue what to do to prevent the error? Increase the stack size? Splitting the xml file into parts and merge them later on?
0 answers