Skip to content

Commit 9cceaef

Browse files
committed
MAGETWO-67343: [BACKPORT] Product export issues for 100K to 600K products
1 parent 1e9b79a commit 9cceaef

File tree

1 file changed

+6
-0
lines changed
  • app/code/Magento/CatalogImportExport/Model/Export

1 file changed

+6
-0
lines changed

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,14 +772,20 @@ protected function getItemsPerPage()
772772
$memoryUsagePercent = 0.8;
773773
// Minimum Products limit
774774
$minProductsLimit = 500;
775+
// Maximal Products limit
776+
$maxProductsLimit = 3000;
775777

776778
$this->_itemsPerPage = intval(
777779
($memoryLimit * $memoryUsagePercent - memory_get_usage(true)) / $memoryPerProduct
778780
);
779781
if ($this->_itemsPerPage < $minProductsLimit) {
780782
$this->_itemsPerPage = $minProductsLimit;
781783
}
784+
if ($this->_itemsPerPage > $maxProductsLimit) {
785+
$this->_itemsPerPage = $maxProductsLimit;
786+
}
782787
}
788+
783789
return $this->_itemsPerPage;
784790
}
785791

0 commit comments

Comments
 (0)