Posted by: gavinadams | 28 June, 2007

Configuring Large File Support

The follow large snippet was blatantly taken from Joel Oleson’s post on File Name, Length, Size and Invalid Character Restrictions and Recommendations.

I always forget these steps so I’m blogging it to my site so I don’t lose it again.

Configuring Large File Support

This snippet from an article on Configuring Large File Support in relation to some fixes in SP2 of WSS 2.0 relate very closely with your WSS 3.0 or MOSS farm when configuring your WFEs/farm to support large files.  You likely won’t find this documentation elsewhere.

From the article on office.microsoft.com:

The biggest change included in Windows SharePoint Services SP1 is the support for uploading large files. By default, the maximum size for uploading files is set to 50 MB. If you need to be able to upload larger files (such as when you use smigrate.exe to migrate a site between servers), you can change this setting to any value up to 2 GB (2047 MB).

To configure large file support you must increase the default upload size in SharePoint Central Administration. You may also need to perform the following additional actions (depending on your hardware configuration):

  • Tune the Microsoft Internet Information Services (IIS) connection timeout setting.

    The default timeout for connections in IIS is 120 seconds (2 minutes). Depending on your maximum file size and how long it takes for the file to be uploaded, you may not need to change this setting. If, however, IIS is timing out when you upload large files, you can change this property to ensure that larger files can be uploaded successfully.

  • Increase the default 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. Note that 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.

  • Increase the maximum size limit for Web Parts.

    By default, the maximum size limit for a Web Part is 1 MB. If you need to accomodate large Web Parts, you can change this setting in the web.config file for your server or servers running Windows SharePoint Services.

Increase the maximum upload size
  1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
  2. Under Virtual Server Configuration, click Configure virtual server settings.
  3. On the Virtual Server List page, click the virtual server you want to change.
  4. On the Virtual Server Settings page, under Virtual Server Management, click Virtual server general settings.
  5. Under Maximum upload size, type the maximum file size (in MB) that you want to allow to be uploaded.
  6. Click OK.

If IIS is timing out when you upload large files, you can configure the Connection timeout setting in IIS to allow more than the default 120 seconds (2 minutes).

Tune the IIS connection timeout
  1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. Right-click the virtual server you want to configure, and then click Properties.
  3. Click the Web Site tab.
  4. In the Connections section, in the Connection timeout box, type the number of seconds you want IIS to wait before timing out.
  5. Click OK.
Increase the default chunk size for large files

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>.

After making a change to this property, you must restart IIS. You can restart IIS by typing iisreset on the command line.

Increase the maximum limit for Web Parts

This change is required only when working with large Web Parts. The maximum limit for Web Parts is set to 1048576 bytes by default.

  1. On your server computer running Windows SharePoint Services, open Notepad.
  2. In Notepad, navigate to the %HomeDrive%\Inetpub\wwwroot folder and open the web.config file.
  3. Locate the PropertySize attribute in the configuration\SharePoint\WebPartLimits element.
  4. Change the PropertySize attribute to the maximum size you need.
  5. Save and close the web.config file.

Large file support limitations

The following features do not support files larger than 50 MB:

  • Virus checking. (Joel: I do believe this is the case.  It’s true as well that files over 16MB by default are not indexed, this can be changed.)
  • Picture libraries (Joel: really?)
  • Streaming files (Joel: We don’t support streaming files anyway do we?  Love for someone to explain this one.)
  • Site templates (limit of 10 MB Joel: Only in WSS 2.0, this is deafult and can be increased in WSS 3.0).

This KB “Error message when you try to upload a large file to a document library on a Windows SharePoint Services 3.0 site: “Request timed out”” has some great info on configuring the server to allow larger file sizes and increasing the time out limits.  Caution!  Whenever you increase timouts, you are essentially increasing the length of sessions and you’ll have more concurrent sessions. 

Increase the maximum upload size
1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
2. Under Virtual Server Configuration, click Configure virtual server settings. On the Virtual Server List page, click the virtual server that you want to change.
3. On the Virtual Server Settings page, under Virtual Server Management, click Virtual server general settings.
4. Under Maximum upload size, type the maximum file size in megabytes that you want, and then click OK. You can specify a maximum file size up to 2,047 megabytes.

Increase the connection time-out setting
By default, the IIS connection time-out setting is 120 seconds. To increase the connection time-out setting, follow these steps: 1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. Right-click the virtual server that you want to configure, and then click Properties.
3. Click the Web Site tab. Under Connections, type the number of seconds that you want in the Connection time-out box, and then click OK.

Add the executionTimeout value
1. Use Notepad to open the Web.config file.

By default, this file is in the following location:
Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
2. Add the executionTimeout value that you want. For example, replace the value as follows.

Existing code
 <location path=”upload.aspx”>
    <system.web>
      <httpRuntime maxRequestLength=”2097151″ />
    </system.web>
  </location>
Replacement code
 <location path=”upload.aspx”>
    <system.web>
      <httpRuntime executionTimeout=”999999″ maxRequestLength=”2097151″ />
    </system.web>
  </location>
3. After you change the file, click Save on the File menu.
4. Use Notepad to open the Web application Web.config file. By default, this file is in the following folder:
Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder
5. Change the following line in the file.

Existing line
<httpRuntime maxRequestLength=”51200″ />
Replacement line
<httpRuntime executionTimeout=”999999″ maxRequestLength=”51200″ />

6. After you change the file, click Save on the File menu.
7. Exit Notepad.

From Joel Oleson’s SharePoint Land

About these ads

Responses

  1. very interesting.
    i’m adding in RSS Reader

  2. What is maxRequestLength=”51200″?
    Is the permited maximum upload bandwidth?

  3. […] Configuring Large File Support […]

  4. Im still unable to upload a 39MB file.
    I got an HTTP 404 error.
    I already configured the web.config maxAllowedContentLength=”52428800″

    Help!

  5. I cannot upload a file more than 30MB, change all settings, error message is “the site is a broken link” Can anyone help ?

  6. I am too having issues with a file of large size. My site locks up everything when trying to add the file to the site. Any suggestions??

  7. My experience is basically the same as Richard’s.. I have made all of the tweaks and still the largest file I can upload is 29.3mb. After it attempts the upload the browser ends up at a 404 page.

  8. I had the same problem as Derek and Richard. Turned out to be URLScan that was overiding the SharePoint settings. We didn’t even know it was installed on the server….

    Check this:

    http://social.msdn.microsoft.com/Forums/en-US/sharepointadmin/thread/ef8b62ab-ac0d-44f0-be1f-85e9d484a30e?prof=required

  9. Finally, I know what happens to my WSS. The problem is not on the settings of the IIS or WSS, it is becasue the Server OS! If you are (just like me) using Win Server 2008, then this is the problem!!

    Check this out!

    http://support.microsoft.com/kb/944981

    I got this from a SharePoint Guru and my problem is fixed!! Ha! Ha!

    • Thanks for your advice! After implementation of your help it does what we need ;-D

  10. “It’s true as well that files over 16MB by default are not indexed, this can be changed” . Is it not indexed at all or is it that the first 16mb will be indexed and the rest not. Can you please confirm it?

  11. I experienced the same thing after I find a reference on the microsoft website and it had this link http://support.microsoft.com/default.aspx/kb/925083.
    ciii huuuu iiiiii

    Contribute a better

  12. Thanks, the info was easy to understand and now my school can add large files for students to access for assessment purposes.
    Thanks

  13. […] Configuring Large File Support […]

  14. Very simple to change maximum upload file size with SharePoint 2010 / Rất đơn giản để thay đổi kích cỡ tối đa của file tải lên với SharePoint 2010 http://sharepointtaskmaster.blogspot.com/2011/05/very-simple-to-change-maximum-upload.html


Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: