Note: As of revision 11/09A of Price Tapestry, the Slow Import Tool can be used to overcome any timeout problems when importing CSV feeds.
Some web hosting companies / dedicated servers, by way of their default PHP and/or Apache configuration, impose restrictions on the amount of time that a PHP script is allowed to run for. This is to protect their servers from erroneous scripts that may be consuming ever increasing resources and therefore impacting on the performance of the server.
If this limitation exists it is normally set to around 30 seconds. If the limit is reached during an import you may see a PHP error message (Maximum execution time exceeded) if it is a PHP imposed limit; or the connection may simply be dropped resulting in an error message displayed by your browser (A connection with the server could not be established) if it is a web server imposed limit.
PHP Imposed Timeout
Normally, this will involve a call to the support desk of your hosting company. Explain to them that you are running a script that is processing a large file and that you would like to have the time limit removed on your account. In most cases, your host will remove the limit in order to keep your business. However, before contacting your host you can try adding the following statement to a .htaccess file in the top level directory of your website:
php_value max_execution_time 0
Web Server Imposed Timeout
If the timeout results in a server error or page failing to load you may be able to import large feeds using the automation scripts as these are not accessed via the web server. To access the automation scripts you will need to be able to login to your hosting account via Telnet or SSH and have the ability to execute commands. A popular SSH client for Windows is Putty, which you can download from here:
If you do not know if you have SSH access to your account it is worth just trying it anyway - open Putty and choose SSH as the connection type. Then enter exactly the same details (hostname, username and password) as you would use to access the FTP server for your hosting account. If you get a connection, you will be presented with a command prompt ($) and can start entering commands. The commands to use the Price Tapestry automation scripts are as follows:
Where <filename> is the filename that you have already registered using the administration interface.
As a final note; it is always worth using XML feeds in preference to text file versions if both are available as they are much faster. In general, almost all hosting accounts can import up to 10,000 products from an XML feed within 30 seconds.