Uploading big files

 

Uploading big files

The default maximum file size for uploads is 512MB. You can increase thislimit up to what your filesystem and operating system allows. There are certainhard limits that cannot be exceeded:

  • < 2GB on 32Bit OS-architecture
  • < 2GB with IE6 - IE8
  • < 4GB with IE9 - IE11

64-bit filesystems have much higher limits; consult the documentation for yourfilesystem.

 

Note

The IFC sync client is not affected by these upload limitsas it is uploading files in smaller chunks.

 

 

System Configuration

  • Make sure that the latest version of PHP (at least 5.6.6) is installed
  • Disable user quotas, which makes them unlimited
  • Your temp file or partition has to be big enough to hold multipleparallel uploads from multiple users; e.g. if the max upload size is 10GB andthe average number of users uploading at the same time is 100: temp space hasto hold at least 10x100 GB

 

 

Configuring Your Web server

 

Note

IFC comes with its own IFC /.htaccess file. Because php-fpmcan’t read PHP settings in .htaccess these settings must be set in the IFC/.user.ini file.

 

Set the following two parameters inside the corresponding php.ini file (see theLoaded Configuration File section of PHP Version and Information to find yourrelevant php.ini files)

 

 

php_value upload_max_filesize = 16G
php_value post_max_size = 16G

 

 

Adjust these values for your needs. If you see PHP timeouts in your logfiles,increase the timeout values, which are in seconds:

 

 

php_value max_input_time 3600
php_value max_execution_time 3600

 

 

The mod_reqtimeoutApache module could also stop large uploads from completing. If you’re using thismodule and getting failed uploads of large files either disable it in your Apacheconfig or raise the configured RequestReadTimeout timeouts.

There are also several other configuration options in your Web server config whichcould prevent the upload of larger files. Please see the manual of your Web serverfor how to configure those values correctly:

 

Apache

 

 

Apache with mod_fcgid

 

Note

If you are using Apache/2.4 with mod_fcgid, as of February/March 2016,FcgidMaxRequestInMem still needs to be significantly increased from its default valueto avoid the occurrence of segmentation faults when uploading big files. This is not a regularsetting but serves as a workaround for Apache with mod_fcgid bug #51747.

Setting FcgidMaxRequestInMem significantly higher than normal may no longer benecessary, once bug #51747 is fixed.

 

 

 

nginx

Since nginx 1.7.11 a new config option fastcgi_request_bufferingis availabe. Setting this option to fastcgi_request_buffering off; in your nginx configmight help with timeouts during the upload. Furthermore it helps if you’re running out ofdisc space on the tmp partition of your system.

For more info how to configure nginx to raise the upload limits see also this wiki entry.

 

Note

Make sure that client_body_temp_path points to a partition withadequate space for your upload file size, and on the same partition asthe upload_tmp_dir or tempdirectory (see below). For optimalperformance, place these on a separate hard drive that is dedicated toswap and temp storage.

 

If your site is behind a nginx frontend (for example a loadbalancer):

By default, downloads will be limited to 1GB due to proxy_buffering and proxy_max_temp_file_size on the frontend.

 

 

 

Configuring PHP

If you don’t want to use the IFC .htaccess or .user.ini file, you mayconfigure PHP instead. Make sure to comment out any lines .htaccesspertaining to upload size, if you entered any.

If you are running IFC  on a 32-bit system, any open_basedir directivein your php.ini file needs to be commented out.

Set the following two parameters inside php.ini, using your own desiredfile size values:

 

 

upload_max_filesize = 16G
post_max_size = 16G

 

 

Tell PHP which temp directory you want it to use:

 

 

upload_tmp_dir = /var/big_temp_file/

 

 

Output Buffering must be turned off in .htaccess or .user.ini or php.ini, or PHPwill return memory-related errors:

  • output_buffering = 0

 

 

Configuring IFC

As an alternative to the upload_tmp_dir of PHP (e.g. if you don’t have access to yourphp.ini) you can also configure a temporary location for uploaded files by using thetempdirectory setting in your config.php (See Config.php Parameters).

If you have configured the session_lifetime setting in your config.php(See Config.php Parameters) file thenmake sure it is not toolow. This setting needs to be configured to at least the time (in seconds) thatthe longest upload will take. If unsure remove this completely from yourconfiguration to reset it to the default shown in the config.sample.php.

 

Configuring upload limits within the GUI

If all prerequisites described in this documentation are in place an admin can change theupload limits on demand by using the File handling input box within the administrativebackend of IFC.

../_images/admin_filehandling-1.png

Depending on your environment you might get an insufficient permissions message shown forthis input box.

../_images/admin_filehandling-2.png

To be able to use this input box you need to make sure that:

  • your Web server is able to use the .htaccess file shipped by IFC (Apache only)
  • the user your Web server is running as has write permissions to the files .htaccess and .user.ini

 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

User Management -I

User Management -I User Management Creating a New User Reset a User’s Password...

Providing Default Files

You may distribute a set of default files and folders to all users by placingthem in directory...

Automated tagging of files

IFC’s Files Automated Tagging app allows to assign collaborative tagsto files and folders based...

Table of Contents

List of All Topics Coverd User Management  User Management-I User Management -II...

User Management - II

User Management - II Resetting a Lost Admin Password Resetting a User Password...

Powered by WHMCompleteSolution