Azure/static-web-apps-cli

"Failure during content distribution" when deploying more than ~3000 files

asbjornu opened this issue · 1 comments

Describe the bug
swa deploy times out after 300 seconds with the error message Failure during content distribution if the number of uploaded files surpasses ~3000 files.

To Reproduce
Steps to reproduce the behavior:

  1. Produce more than 3000 files to upload to an SWA.
  2. Execute swa deploy to deploy the 3000+ files.
  3. Notice how Status: InProgress. Time: … is printed to the console 20 times.
  4. Notice how the deployment ends after 5 minutes with the error message Failure during content distribution.

Expected behavior
I expect SWA to be able to upload more than ~3000 files. Either by allowing the timeout to be increased, or – preferably – by the SWA infrastructure simply working faster to distribute the files.

Screenshots
Deployment Failure Reason: Failure during content distribution.

Desktop (please complete the following information):

  • OS: macOS
  • Version: 13.6.7

Additional context

I've been in touch with Microsoft Support regarding this issue, and after several weeks of back and forth it was identified and acknowledged with the following response:

Deployment with the provided project zip file: The deployment process is no longer getting stuck in the 80+ seconds between logging UTC time. The job-command is simply enumerating the files before proceeding to copy them as designed. The project files contain many directories with a small number of files in each.

Identified root cause and possible fix: The fix cannot be implemented quickly and will require longer-term planning.

The issue was then resolved with the following response:

In the meantime, it is recommended to reorganize the project files to reduce the number of subfolders.

We are working on a Dedicated SKU for Static Web Apps to more easily support customers with fine-grained control over settings that influence content distribution behavior. This new SKU will take the current issue into account.

Because of this, as well as Azure/static-web-apps#941 which has begun to rear its head with increasing frequency, we'll be migrating away from Azure SWA.