Try our conversational search powered by Generative AI!

Upload media file "Timed out, or max file size exceeded"

Vote:
 

I am trying to upload a mp4 file in the media manager and one video about 20MB works but the 70MB video fails with message "Timed out, or max file size exceeded"

The video file then shows in the folder I uploaded it to but when I try to embed it on a page I get an error.

I have set the maxAllowedContentLength in web.config bot under the base and so config looks something like this.

...


 
   
     
   

 

...

 
   
     
       
     

   

 

...

...

Clearly there is some episerver config I need to set for max file size or something but I don't know what. Please help.

#89123
Aug 07, 2014 22:35
Vote:
 

I don't think it is a file size issue, i think it is the request time that is maxing out.

you can set that on the

#89126
Aug 08, 2014 5:18
Vote:
 

Basically CMS will be "limited" by ASP.NET and IIS settings. So you'll need to set both maxAllowedContentLength (used by ASP.NET) and maxRequestLength (used by IIS). They should be the same value, otherwise the "smaller" will take effect.

Note that maxAllowedContentLength setting is in byte, while maxRequestLength is in KB.

Regards.

/Q

#89137
Aug 08, 2014 8:52
Vote:
 

I added

to the web.config but it did not fix the problem.

I also tried removing all maxRequestLength and maxAllowedContentLength configurations but this made the problem worse.

However I was able to confirm with another project that I can upload the same file (~70MB) with no problems and no explicit limits to file size or request length in the web config.

#89346
Aug 13, 2014 23:28
Vote:
 

Is there a solution to this? We followed the configuration changes as specified, but, we keep getting the error "Timed out, or max file size exceeded" on our Load Balanced Server. 

#120441
Apr 17, 2015 3:07
Vote:
 

Did you set the executionTimeout as well? I made a small reference sample:

<configuration>
  <system.web>
    <!-- ASP.NET settings, specifies the limit for the input stream buffering threshold in kB -->
    <!-- executionTimeout gets default value of 110 seconds, affects all urls for the site -->
    <httpRuntime maxRequestLength="40960" requestValidationMode="2.0" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <!-- IIS settings, specifies the maximum length of content in a request in bytes, default value is 30000000 -->
        <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
    </security>
  </system.webServer>

  <location path="EPiServer">
    <system.web>
      <!-- Override settings in edit and admin mode -->
      <httpRuntime maxRequestLength="1048576" requestValidationMode="2.0" executionTimeout="7200" />
    </system.web>
  </location>
</configuration>
#120581
Apr 21, 2015 9:09
Jim - Dec 29, 2020 21:47
This example shows a system-wide maxRequestLength of 40,960 KB (41,943,040 bytes). The maxAllowedContentLength is set to 1 GB (2^30 bytes). The EpiServer maxRequestLength is set to 1,048,576 KB (1 GB).

Doesn't the first one need to match the other two?

Also, will this affect file uploads from website visitors?
Quan Mai - Dec 30, 2020 7:47
They don't have to match. Smaller value will be allowed.
If nothing else - like you have check for upload size from visitors, this applies to them as well
Vote:
 

Thanks for the replies (and sorry for getting back on this quite late).

We have those settings in the web.config and it was still throwing an error on the load balanced environment (but works fine on non-LB ones).

Our SysAd found that the issue is caused by request limits issues for SSL on load-balanced servers: https://support.microsoft.com/en-us/kb/2634328

Just in case it helps anyone.

#133333
Sep 02, 2015 7:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.