I agree with @Dean and add on to that, If you change the maxRequestLength
setting, you should also change the Media.MaxSizeInDatabase
setting.Media.MaxSizeInDatabase
should always be less than maxRequestLength
.
1. Sitecore media file size setting
By default, Sitecore allows files of up to 500MB in the media library. This is very large and files of even a 100th of this size will likely be a problem for your site. The patch file to override the default size and set the max size too, say, 10MB looks like this.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="Media.MaxSizeInDatabase" value="500MB">
<patch:attribute name="value">10MB</patch:attribute>
</setting>
</settings>
</sitecore>
</configuration>
With this setting and the uploader set to classic, you should no longer be able to upload a file large than 10MB. This dialog is displayed when attempting to upload an oversized file.
2. Maximum Allowed Upload Size
You want to allow the webserver to allow uploads as big as the maximum media file setting. Check the web.config
for this setting. Below is an example.
<system.web>
<httpRuntime targetFramework="4.7.1" maxRequestLength="512000" executionTimeout="600" enableKernelOutputCache="false" relaxedUrlToFileSystemMapping="false" enableVersionHeader="false"/>
</system.web>
The server is set to receive files up to 500MB in size. This is fine with the media file restriction and can be left as is, but you might want to reduce this setting to be in line with the media file limit you have set so that the web server can provide the initial limit before allowing an upload that is destined to fail in Sitecore through.
Hope it helps!