Failure while deploying large zip file via API

Hi,

We’re evaluating netlify to switch away from manually managed servers and are attempting to manually deploy a ZIP file via the API.

The command we’re using is:

curl --progress-bar -H "Content-Type: application/zip" -H "Authorization: Bearer <token goes here>" --data-binary "@2821.zip" https://api.netlify.com/api/v1/sites

The upload finishes far too quick - in about 4 seconds and if I look at the deployment log I can see the following:

1:20:26 PM: Creating deploy upload records
1:20:26 PM: Unpacking archive
1:21:01 PM: Unpacking archive
1:21:39 PM: Unpacking archive
1:22:20 PM: Unpacking archive

Site name: heartfelt-dango-46888b

Additional context: The zip file is large - about 200mb and there are over 60k files within (spread over a variety of sub directories).

My concern is that this size of zip / site may simply not be supported. I’ve tried searching the docs & forums and all I found was a max limit of ~57k files in a single directory.

I believe that the upload may be stopping prematurely - given the size of the zip I believe it finishing ~4s is far too soon, but I don’t get any errors around this either.

Any help or information around this would be much appreciated.

Side note: Before attempting the larger zip file I tried a much smaller test zip file (with a single index.html file) and this uploaded and deployed successfully.

thanks,

Hi @seanlandsman and sorry to hear about the trouble! I can indeed see an internal error trace for that deploy that reports that 43,383 files is “too many”. That doesn’t really line up with the number you mention, but it is anyway a good sign that a larger zipfile deploy also won’t work.

Could I suggest that you instead deploy with either the CLI (no need to zip up first): Get started with Netlify CLI | Netlify Docs or by committing all the files into a github repo?

The error was specifically in our zipfile handling, so either of those methods - not using a zip - should work better for a site of this size :slight_smile:

Hi,

Thanks - I’ll be sure to investigate/try this when we try this again.

Many thanks for your help.

thanks