Java Web App on Azure App Service Failed with 413 Request Entity Too Large

Aayush Suresh Jain 141 Reputation points
2024-06-21T10:35:30.2966667+00:00

I have a Java - JSP and Servlets web application hosted in Azure. One of the function in web app allows user to upload a comma separated CSV files. However when the file size of more than 2.8MB, the function errors out stating 413 Request Entity Too Large error.

The upload works perfectly fine when I run it locally.

I read through articles that say we need to increase the max-limit for file size. How can I increase the File Size Limit through azure?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,227 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshukatara-6769 6,475 Reputation points
    2024-06-21T10:58:06.9566667+00:00

    Hi Aayush,

    You can also check the similar issue with solution https://learn.microsoft.com/en-us/answers/questions/636604/microsoft-azure-app-service-response-413-payload-t

    For example,

    If you're using Spring Boot, you can set the spring.servlet.multipart.max-file-size and spring.servlet.multipart.max-request-size properties in the application.properties or application.yml file.

    Please refer to your specific server or framework's documentation for the exact steps. If you're still having issues, you may want to reach out to Azure support for more specific guidance.

    Please let me know if any further , kindly accept if it helps

    Thanks

    Deepanshu