Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Propaxxx's avatar

Vapor - How to increase Size of folder for deploying to staging and production?

I try to deploy our code to staging I was found an error message something like this.

  • Compressed application is greater than 45MB. Your application is 69 MB.
  • Whoops! There were some problems with your request.
  • Vapor applications may not have more than 300 public assets.

Very small ????? It's not enough.

Thank you

0 likes
3 replies
bobbybouwmann's avatar

Well that's the whole idea about Vapor, because it runs in a Lambda on AWS. They have limits and should keep to them otherwise the lambda's wouldn't make any sense!

Source: https://dzone.com/articles/exploring-aws-lambda-deployment-limits

So it's probably wise to remove all files from your application that you don't need to run your application. For example data files that you use in tests or the node_modules directory and so on.

Snapey's avatar

if you have a large collection of public assets (images and files in the public folder) then you should consider moving these to a seperate location like a CDN. They are probably only referenced by URL (not code) and that URL could point anywhere.

1 like

Please or to participate in this conversation.