SharePoint 2010 File Size Upload Limits

source link

Excellent article. Credits goes to the author!

Errors Encountered:
– “Page cannot be displayed” when uploading large files
– Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved
– The specified file is larger than the maximum supported file size

1. Setting File Size Upload Limits on a Web Application

1. Login to Central Admin and navigate to Central Administration -> Application Management -> Manage Web Applications.
2. Once there highlight the web application that you want to change and then click on general settings:
clip_image001
3. Once in general settings scroll to the bottom of the list and you will see the maximum upload size the default setting is 50mb this can be can set to a maximum size of 2047mb (2GB). If you try to go beyond this it does flag up and tell you that you have exceeded the Maximum size.
clip_image002

2. Changing the Web.config file in the IIS Root Folder of Each Web Application

Independently of the SharePoint Web Application file size upload limit Central Admin steps described above, we need to also manually (backup with a copy first) open up the Web.config XML file located in the root folder of each web applications IIS Website.
1. Open the Internet Information Server (IIS) management console on the server desktop
2. Open the Websites tree node on the left 3. Select the website(s) one at a time and go to their root folder by clicking “Open in Explorer View”
3. Locate the web.config file in the folder and make a copy of it (generally acceptable to leave a copy with a name like “web_backup.config” in the root folder) in case it becomes corrupted while you’re editing it.
4. Open the web.config file with NotePad and change the value in the following node from the default of 50MB (expressed in KB):

..to a new value, e.g. 200 MB:

If you are not a math fan (like me), you can easily do the KB / MB / GB calculation (sorry, Bing doesn’t seem to want to help on this one!) by just typing in “200 MB in kilobytes” into Google.
5. IMPORTANT: Repeat the same settings configurations for each server in the SharePoint farm. Web.config’s are just plain XML files and when we are manually mucking about with them there is nothing to tell their sister .config files on the other SharePoint servers in the farm to reflect those changes. You want to avoid inconsistent settings between servers.
Notes on these steps:
– services will be briefly interrupted to SharePoint at the moment you click “Save” in Notepad as it will induce an application pool recycle
– make sure not to dilly dally when you have any particular web.config open in Notepad; it is possible that other processes could potentially may want to modify the config file while you’re using it. Get in and get out like that mission in Grenada.

3. Increase the IIS7 Machine-level Request Length Setting

1. Open an Administrative Command Prompt on each SharePoint server desktop
2. Enter the following command, entering the value in BYTES (not kilobytes this time) at the end:
%windir%system32inetsrvappcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:209715200
You will receive a confirmation message after applying the command. Please bear in mind that you will need to run the cmd.exe in administrator mode.
clip_image004
Notes on these steps:
– services will be briefly interrupted to SharePoint at the moment you click “Save” in Notepad as it will induce an application pool recycle

4. Increase the IIS7 Application Pool Idle Time-out Settings (Optional)

IIS7 sets application pools to “time-out” after 20 minutes of inactivity. So if you don’t have a visitor to your site within 20 minutes the application pool will shut down – freeing up those system resources. Then the next time a request comes into the site IIS7 will automatically restart the application pool and serve up the requested pages.
This is a great way to preserve resources since every running application pool does place a certain amount of overhead on the system. But, it also means that the first request – the one that causes the application pool to restart – is very slow. It is slow because the process literally needs to start, then load the required assemblies (like .NET) then load the requested pages. Depending on the size and complexity of your application, this might just be a couple of seconds or it might take 30+ seconds (during which time a user would likely give up and move on to a different site).
If you want to extend the length of the time-out setting, just change it from the default of 20 to however many minutes you want. You can also adjust the setting to 0 (zero) which effectively disables the timeout so that the application pool will never shut down due to being idle.
1. Open Server Manager & Expand the Roles node
2. Expand the Web Server (IIS) node. Then click on the Web Server (IIS) node
3. Expand the node with your local server name
4. and click on the Application Pools icon. You’ll then see a list of the application pools that are defined on your server. In the right-hand pane you’ll see an option for Advanced Settings – click that.
clip_image005
5. Once you see the Advanced Settings dialog box just look for the Idle Time-out (minutes) property; click where the default “20″ is, and change it to whatever value you prefer.
Notes on these steps:
– you need to monitor & plan resource consumption; the idle timeout mechanism is there for the health of the overall system so that idle applications don’t chew up memory needlessly. Setting a huge timeout may be great for allowing big uploads but you need to make sure it’s not throwing resource consumption patterns off kilter in other areas.

5. Increase the IIS7 Connection Timeout Length (Optional)

One more thing to keep in mind is the connection timeout settings: When you upload large files, depending on your connection speed it can happen that the connection times out. If you want, you can increase the connection timeout to a larger value. The standard is 120 seconds. This step is optional, but can become required if you have users with low speed internet connections.
1. Open IIS
2. Select the Web Application
3. Click on Advanced Settings
4. Expand Connection Limits
5. Set the new value for Connection Time-out (seconds)
clip_image008

6. Increase the Web Client File Size Limit

When you upload a large file (over 50Mb usually) to SharePoint 2010, you might get an “Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved” message. Check your  current SharePoint file size upload quota and web.config settings. If the quota is not a problem, then the error is most likely caused by a local restriction set on Web Client service. By default, Web Client file size limit is set to 47Mb or so. To increase this limit:
1. Open Windows Registry using regedit command
2. BACKUP THE REGISTRY!
3. Browse to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesWebClientParameters
4. Right click on the FileSizeLimitInBytes and click Modify
5. Click on Decimal, and type 4294967295 and click OK
6. Restart Web Client service by typing services.msc.
This will increase the Web Client file size limit to 4Gb, which is a maximum file size you can upload using WebDAV. Please note, that this will only address Web Client service restrictions, and will not increase your SharePoint quota .. you still need to address those points approriately as per the linked MSDN blog post above.
It is also of note that the SharePoint max, cannot raise, hardcoded file size limit is 2GB, period, so raising to 4Gb is essentially overkill. ;)
p.s Don’t forget, if you want to use WebDAV effectively in SharePoint, you will need to have the Desktop Experience feature turned on in Win2k8 – you’ll run into inexplicable intermittent transfer drops otherwise.
That’s it!
clip_image010

7. Increase the SQL Chunk Size for Large Files

The large-file-chunk-size property sets the amount of data that can be read from server running SQL Server at one time. If you have a file that is greater than your chunk size (such as 70 MB when the chunk size is set to 5 MB), the file would be read in 14 chunks (70 / 5).
The chunk size is not related to the maximum upload file size. The chunk size simply specifies the amount of data that can be read from a file at one time. By default, the large-file-chunk-size property is set to 5 MB. If you notice performance or scale problems on the client or server, then you may need to tune this setting to get the performance you are targeting.
1.The large?file?chunk?size property must be set from the command line. This property is configured for a server or server farm, and cannot be configured for an individual virtual server. To set this property, use the following syntax:
Stsadm.exe ?o setproperty ?pn large?file?chunk?size ?pv
2. After making a change to this property, you must restart IIS. You can restart IIS by typing iisreset on the command line.
Notes on this section
-if you raise the chunk size too high, the files might use up too much front-end memory and you may need to lower this setting.

Notes & Caveats

-2047MB is the limit you can use for uploading files. RBS does not get around this either. If you upload the 2GB file and watch you w3wp.exe worker process it will consume this extra memory so it’s not a good idea to do huge uploads it will stop other request to the server (IIS web site at least).
– the IIS7 worker process w3wp.exe has a 4GB limit therefore as the upload would need all the memory to perform an upload. 2GB is a safety limit enforced by SharePoint.