Dear Experts, I have setup a published REST service endpoint that accepts multipart/form-data as Content-Type. I am trying to upload a file of size 580MB and system crashes with Java Heap space Exception. I’ve used FileDocument to receive the content which is getting blown up as the default behavior is trying to read all the data at once. With Standalone Setup (Without Mendix), I feel that we can stream the request and handle the payload (write the stream contents to a file) with less memory footprint. Does Mendix published services support such Streaming capabilities or is there a workaround to accomplish this use case?
S C Chengaiah
By default we would not recommend using Mendix for File Orchestration.
However… of course the first option would be to increase the server memory / heap space but if your file size grows above $x amount, what’s next?
You could try to use Java code to solve your issue.
1. Writing data to filesystem and sending it from there, not loading it into the server memory and heap space
2. Writing the Big file to the filesystem, splitting the file up and sending it back to Mendix so you can send the files in parts to the other side.