diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index f598e6112..ac68b6d92 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -258,6 +258,7 @@ class PocketImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; } diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php index d65bc5306..b265f9f10 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagImport.php +++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php @@ -185,6 +185,7 @@ abstract class WallabagImport implements ImportInterface // flush every 20 entries if (($i % 20) === 0) { $this->em->flush(); + $this->em->clear(); } ++$i; }