2021 Nov 08 10:55 AM
Hi experts,
Whilst deploying and HTML5 on Cloud Foundry we are getting the error as follows:
[ERROR] Upload application content failed { CODE: '1001' } validation error: applications size exceed the service plan limit of 100 MB
We have followed the note as follows:
https://launchpad.support.sap.com/#/notes/0002764058
Modifying the MTA file as below:
- name: IntegrationAdvisoryWizard_html_repo_host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-name: IntegrationAdvisoryWizard-html5-app-host-service
service-plan: app-host
config:
sizeLimit: 16<br>
But the issue still persist although the app is by far smaller than 16MB.
Any idea about how to solve the issue?
Thanks in advance!
Regards,
C.
2021 Nov 08 3:29 PM
The way I read this error message your applications is too large. That would mean it's not related to your mta.yaml definition.
How big is your "dist" folder.
2021 Nov 09 10:19 AM
Many thanks mariusobert for your prompt response.
I have not been able to find that dist folder but I have seen the following.
The .mtar file created and being deployed contains a folder named *content.zip/resources/static/js. The interesting thing is that this folder is adding files .chunk.js, .chunk.js.LICENSE.txt and .chunk.js.map every time a "mbt build" is executed. The interesting thing, and I am not sure if it is the normal behaviour, is that old files remain in this folder and we have the whole history of files since the first build. Therefore, everytime there is a new build, the size of the folder gets increased and now is >100MB, hence the error. That explains why during 6 months we have not had any issues deploying and, without substantial changes at all in the size of the app, we are now not getting this error. The last time the deployment worked, that folder was < 100MB.
Just to add in case it may matter, the apps is a react app created following the blog below created by yuval.morad
https://blogs.sap.com/2021/07/05/react-development-with-sap-business-application-studio/
Any idea about how to solve this?
Many thanks in advance.
Regards,
C.
2021 Nov 09 12:02 PM
Interesting 😕
Can you share your MTA.yaml file as well. Maybe this will provide some hints.
2022 Nov 03 5:46 AM
cachico / mariusobert - was there any further answer to this? We are facing the same issue - React app converted to MTAR is failing suddenly which was working all the file. As Cristian mentioned, seems like the MTAR is getting accumulated instead of over-written. From local, we even deleted the MTAR and rebuilt, still the size is more than 100MB. Any solution?
2024 Apr 30 1:01 PM
A suggestion here is to use ignore parameters;
https://github.com/SAP-samples/fiori-tools-samples/blob/main/cap/cap-fiori-mta/mta.yaml#L19
Also ensure you are not pulling in any third party resouces, instead, use CDN links.
Change the .mtar to .zip, expand out the contents and see what is being bundled up and deployed.