diff --git a/Model/Service/Sync/Upsert/SyncService.php b/Model/Service/Sync/Upsert/SyncService.php index fda89b5ae..ec291edd8 100644 --- a/Model/Service/Sync/Upsert/SyncService.php +++ b/Model/Service/Sync/Upsert/SyncService.php @@ -169,7 +169,7 @@ public function syncProducts(ProductCollection $collection, Store $store) $this->logDebugWithStore( sprintf( - 'Upserting batch of %d (%s) - API timeout is set to %d seconds', + 'GC ON: Upserting batch of %d (%s) - API timeout is set to %d seconds', $this->apiBatchSize, implode(',', $productIdsInBatch), $this->apiTimeout @@ -177,6 +177,7 @@ public function syncProducts(ProductCollection $collection, Store $store) $store ); $op->upsert(); + gc_collect_cycles(); } $this->logBenchmarkSummary(self::BENCHMARK_SYNC_NAME, $store, $this); }