SharePoint 2010 File Size Upload Limits – The Essential Mix

​Clearly there are a lot of articles & posts on net regarding increasing File Size Upload limits in SharePoint. Unfortunately I couldn’t find any one that was comprehensive enough to include ALL the tweaks you need to consider to accomplish the goal, on both the SharePoint and IIS level. So here’s mine:

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):

<httpRuntime maxRequestLength=”51200″ />
..to a new value, e.g. 200 MB:
<httpRuntime maxRequestLength=”204800″ />

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%\system32\inetsrv\appcmd 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_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
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 <size in bytes>

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.

Incoming search terms:

Tags: , , , , , ,

Trackback from your site.

Keith Tuomi

Keith is SharePoint Consultant and problem solver with itgroove. He's been focused on Microsoft technologies as a Developer and Web Applications specialist since the beginning of the internet era in the early '90s, with formal training coming from the esteemed British Columbia Institute of Technology. He is a SharePoint MVP, which is a coveted Microsoft award for community contributions and technical excellence. Keith has wide array of international experience and is also adapt at translating your business needs into bits & bytes.

Comments (7)

  • Subhan

    |

    Thank You for such a well written article.

    It is of real help, as I too couldn’t find a single source (including MSDN Support) where proper steps are noted for this requirement of increasing file upload size.

    Reply

  • how can I show an message(alert) when exceeding the limit during the time of uploading ?

    |

    How can I show an message(alert) when exceeding the limit during the time of uploading in sharepoint 2010 doc library?

    Reply

    • Keith Tuomi

      |

      There’s no way to proactively determine the file upload size and throw an alert/error – as that would require access to the users file system, which is simply not possible in regular HTTP uploads. Using Flash or Silverlight, it is possible to access details of the file to be uploaded from the users desktop. Therefore there is a possibility of writing a custom Application page for SharePoint 2010 that has an upload control that could say “Hey, this file you’re going to upload is really much too large for our system to handle”. It would not be an exact science, as upload time is a combination of bandwidth and latency.

      Otherwise, your users will most definitely get an error/alert if one of the default SharePoint timeout limits is hit.

      Reply

  • Alysa Worthy

    |

    HI, I understand that the settings must be increased to allow for large file upload, however can I use PowerShell to import a file that exceeds the default upload amount without error? simply stated, not change the default amount of the web app and upload the larger file using PowerShell to bypass the threshold?

    thanks

    Reply

    • Keith Tuomi

      |

      Hi Alysa,

      No matter the method used to transfer the file in it’s going to have to meet the SharePoint object model and IIS settings- PowerShell, although being powerful as it’s name implies, can’t let you overcome the settings described in this post, unless you somehow used it temporarily increased the limits. That would mean configuring all of the limitations described in this post with PS, which i’m not sure is even possible.

      Reply

  • Avik Kundu

    |

    We have an issue where we need to upload videos more than 500 MB size and want to show in sharepoint pages. We want to upload the videos in a shared folder. Is it possible?

    Reply

    • Keith Tuomi

      |

      Sure, as indicated on this post the max upload size per file is 2GB. You could provide the WebDAV (Windows Explorer View of a SharePoint library) link to your users and they would be uploading files via the shared folder.

      The general way that you normally interface with a WebDav enabled server is via My Network Places
      •Open Windows Exploer
      •Select “My Network Places” on the left pane under “Other Places”
      •Click on “Add a Network Place”
      •The “Add Network Place” wizard will then start, click on Next
      •Select “Choose another network location” and click next
      •Type in your path to your document library such as “http://www.mywebserver.com/Shared Documents” and click next
      •Give it a name and click next
      •Click finish

      Your Network Place will then be displayed in an explorer window. This window however does use the full path that you specified as the location/address in Explorer ( \\www.mywebsite.com\Shared Documents ). Wouldn’t it be nicer to map it to a drive letter such as X: so that any application can save directly into the Sharepoint document library?

      Well you can if you follow these steps instead.

      From Windows Explorer
      •Open Windows Explorer
      •Select Tools / Map Network Drive
      •Select your drive letter
      •Under Folder : enter your url to your document library such as “http://www.mywebserver.com/Shared Documents“
      •If you want to connect as a specific user click “Connect using a different name” and enter the other user credentials.
      •Click on Finish

      From a CMD.EXE Prompt
      •Start a command prompt (type cmd.exe into the Start-Run option)
      •Type in the following:
      net use x: “http://www.mywebserver.com/Shared Documents” /user:DOMAIN\LOGIN PASSWORD

      •You will now have a drive letter mapped to the Shared Documents folder.

      Note: You will need to enable the WebClient service if it is not running already

      Reply

Leave a comment

Recent Comments

  • Keith Tuomi

    Sure, this was the same question we were pondering in our internal corp infrastructure- can we consolidate these servers to maximize efficiency and resource usage? Since the official guidance is that yes, you could install Workflow Manager on a SharePoint server- I see no reason and have no evidence that it would not work for an OWA server as well.

    OWA is basically a pumped-up web application that’s sole purpose is to answer the phone on it’s web service. SharePoint is massively more complex with many more moving parts and dependencies – so logic stands that if you can make WFM work on the same box with SP, getting WFM to work on OWA should be even easier.

    I would suggest you give it a shot, monitor & test carefully, and let us know how it goes!

Follow me on Twitter

Office 365 Service Health

  • Service: SharePoint OnlineIncident Type: SharePoin […]
    Sat, Aug 30, 2014
    Source: Office 365 Service Health Status
  • Service: Office 365 PortalIncident Type: PortalSta […]
    Fri, Aug 29, 2014
    Source: Office 365 Service Health Status
  • Service: Office 365 PortalIncident Type: PortalSta […]
    Fri, Aug 29, 2014
    Source: Office 365 Service Health Status
  • Service: Office 365 PortalIncident Type: PortalSta […]
    Fri, Aug 29, 2014
    Source: Office 365 Service Health Status
  • Service: Office 365 PortalIncident Type: PortalSta […]
    Fri, Aug 29, 2014
    Source: Office 365 Service Health Status

SharePoint & Office Patches

VisualStudio.com Service Health