0

I am getting Error: Received exception event aura:systemError from server somewhere inside of aura_prod.js when call apex with large body (>3Mb).

import upload from '@salesforce/apex/Upload.upload';
export default class UploadSample extends LightningElement {
    handleUpload() {
        upload({ data: {}}) /* large body */
    }
}

It works fine with data less than 3 Mb. How to resolve my issue to be able send larger body ?

  • Would you mind uploading the apex code? Is the method you are calling cacheable? – joshii May 16 '19 at 20:55
  • My guess would be that you're running into the 6 MB heap limit on the Apex side. Whatever you send into Apex, you'll need at least that much to deserialize (or make a copy when you stick it into, say, an Attachment). 3+ MB * 2 > 6 MB – Derek F May 16 '19 at 23:05
  • Are you trying to upload files to apex? – RedDevil May 17 '19 at 9:11
  • Yes, I try to upload file. I call apex with file data in base64 format – Vitaliy Malyshev May 17 '19 at 9:32
  • Apex is not being called at all. UI throws that error if body is large – Vitaliy Malyshev May 17 '19 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.