Upload a large file to use in my webapp

Jim Derry 146 Reputation points
2022-11-28T15:21:25.05+00:00

We are trying to upload a large file through our web app to a blob storage container, and then use it with our web app. Everything works well for smaller file sizes, up to 20 MB or so. But we also use larger files. the current one we are uploading is 98 MB in size. We have researched and implemented changes to web config in order to handle the larger file size, but we keep getting out-of-memory exceptions for the larger sizes.

The upload works when I use the local/ debug files to upload the file through Visual Studio. But it fails for out of memory every time we try in the dev or production environments. Any ideas on what I can do to get this file uploaded?

We are using asp.net 6 framework for development and our web app fails for out-of-memory exceptions even when we use a P2V2 pricing tier.

264864-upload-error-image.png

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
    2022-11-29T02:58:21.357+00:00

    @Jim Derry We understand you are receiving a system out of memory error.

    The last time we saw this error, the fix was rather easy. By default, App Services is set to 32-bit as the platform as shown in the below screenshot. Updating this to 64-bit has resolved this error in the past for other customers.

    1. Navigate to portal.azure.com
    2. Locate your app service
    3. Go to the configuration blade
    4. Select general settings
    5. Update the platform to 64-bit (note: this should not cause issues for a vast majority of applications but anytime you make a change on a prod app, it would be better to do it during your low hours to ensure there is no impact to site availability. Also, this will trigger an app restart.)

    Updating your app service plan to a higher tier would not have helped if your app is indeed running at 32-bit.

    Let us know if there are further questions or concerns.

    264929-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.