This documentation refers to an older version of CiviCRM (3.4 / 4.0). The current stable version is 4.1. Please introduce all documentation changes and new material here.

Skip to end of metadata
Go to start of metadata
This page refers to CiviCRM 3.4 and 4.0, current STABLE version.

Documentation Search


CiviCRM 3.4 and 4.0 Documentation

Support and Participation

Developer Resources


CiviCRM books!

Make sure to check out the FLOSS Manual Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

What is the maximum number of Contacts one can import during a single import cycle? Is there a physical limit? Can one define it someplace?

There is no hard limit in the code on the number of maximum contacts that can be imported. However, there are limits to the filesize that is used as the import source file.

The limit depends on your PHP configuration and/or your CiviCRM version.

For older CiviCRM installations:

The default limit is 1Mb. It can be customized in the file:

crm/modules/config.inc.php

by the constant

define( 'CIVICRM_MAX_IMPORT_FILESIZE' , 1048576);

The maximum filesize allowed is 8Mb.

For newer versions (2.0 and higher, possibly lower as well), read on for a more complicated answer.

First, all forms with a file upload are affected by the code in

which sets an html MAX_FILE_SIZE value in the form itself. This is done to prevent file size-related timeouts from PHP, and is calculated by initially setting the limit to 1Mb, and then testing the PHP initialization value of  

ini_get('upload_max_filesize')

So the first simple answer if you're getting size errors is that you'll probably need to edit your PHP ini values: look for the string 'upload_max_filesize', since most php distributes with that set to 4 Mb.

Secondly, some forms (perhaps most?) deliberately limit the MAX SIZE in code to 8Mb. As of 2.0, you can find them with a simple grep:


So, if you need more than 8 Mb, you'll need to edit the relevant line of codeabove. Note that this 8Mb limit is probably sensible for most installations - you should only change it if you know what you're doing and are prepared to live with the consequences (e.g. timeouts that leave your data in an uncertain state.)

Labels
  • None