VS Code deployment error: "Offset to Central Directory cannot be held in an Int64"

Zalán Joób 0 Reputation points

I'm deploying a Flask Web App to a Linux B1 App Service with one instance. My zip package size is under 900MB.
When the web app is running I get the following error: "Offset to Central Directory cannot be held in an Int64", but if I stop the App Service and retry, it deploys without any problems.

My local project directory is 4GBs including the environment(3.5GB of this data are GeoTIFF files). The Web App currently doesn't generate any excess data while it's running.

My quotas tab shows that I have plenty of available space in the App Service with the app successfully deployed and running.

User's image

One of the deployment logs:

hh:24:11 Project: Zip package size: 843 MB

hh:24:13 Project: Fetching changes.

hh:24:14 Project: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/499c6545-c5e9-48f1-9cf2-982df9c59b5f.zip (267.84 MB) to /tmp/zipdeploy/extracted

hh:24:14 Project: Offset to Central Directory cannot be held in an Int64.

hh:24:18 Project: Deployment failed.

I've noticed that the pushed zip files size changes between 250 and 400 MB during these failed deployments.

Thank you for the help in advance!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,524 questions
{count} votes

3 answers

Sort by: Most helpful
  1. ajkuma 20,861 Reputation points Microsoft Employee

    Adding more info:

    Just to highlight, if multiple apps are in the same ASP, they all share the same VM instances. If you have multiple deployment slots for an app, all deployment slots also run on the same VM instances.   In a nutshell, the ASP is the scale unit of the App Service Apps. If the plan is configured to run 4 VM instances, then all apps in the plan run on all 4 instances.

    • Ensure that you have the llatest version of Azure Tools installed.
    • If you have a small instance, Scale-up and check if it makes any difference.
    • Note that, TAR and GZIP formats are not supported and the ZIP file can be at most 1GB
      ( I understand the file size for you is under 1 GB). You may leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal. (screenshot below)
      • In the left navigation, click on Diagnose and solve problems - Review - “Configuration and Management and “Availability and Performance”  options.
      User's image
    1 person found this answer helpful.
    0 comments No comments

  2. Zalán Joób 0 Reputation points

    It deploys successfully with a 2-instance B2 plan.

    I managed to solve the problem for a 1-instance B1 plan by deploying my big static files one by one with Azure CLI and changing the URLs in the program to reference the previously deployed static files in my wwwroot folder. It cut down the deployment .zip package size to just 11MB(from 850MB). I was able to deploy the smaller .zip even while the Web App was running. My advice for anyone with the same problem is to deploy the static files via FTP. It's slower, but you don't have to input each command one by one.

    Thank you for the help! The problem for my specific use case is solved, but I can supply more information if my feedback is of any use!

    1 person found this answer helpful.

  3. Next Six 5 Reputation points

    i do face the same issue on my VSC with azure tools. it works perfectly fine until today. we have built reactjs project deployed to the 2 different instances as below:

    i have

    Offset to Central Directory cannot be held in an Int64.

    on my S1, while i have another error on my P1v2 as shown below

    Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory. 
    1 person found this answer helpful.