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