Drupal 7 feed import incomplete or too slow

In our setup SAP exports a daily price and stock file for our website.
The file is uploaded in a script via FTP to the “feeds” directory in Drupal.
We have a cron job running once per day which triggers a feed parser in Drupal which reads the file and updates our products.

As our online catalog of products expanded we noticed very long imports taking place, sometimes hanging at a random process percentage without completing.

After a short research it seems that the default feed import chunk is set to 50, thus sometimes requiring multiple chunks to run until finishing import.
The chunk size is easily set by specifying a different value in settings.php (located at “/sites/default/”):

2000 is mentioned as a value suitable for many cases – a balance of sufficiently big chunk while not too big as to cause a php script timeout.

Experiment and let me know what value works best for your feed imports.

Leave a Reply

Your email address will not be published. Required fields are marked *