-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Failure to allocate memory error when importing customers in admin #8851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, same issue here in CE 2.1.5. This is weird, no log results at all, I don't know how to fix it... Thanks, Pedro |
@kevin-carroll-cl , Thanks for the feedback. |
Hi, We have the same problem as described in the ticket by kevin-carroll-cl . In order to reproduce it you need to have a store that already have inside a lot of customer (our import doesn't work after 100k users and memory limitation of 256 MB). When you are trying to import new customers after a specific number of customers are already imported, you will not be able to import even 1 more customer. |
@kevin-carroll-cl Internal ticket MAGETWO-70964, which tracks this GitHub issue, is in our issue backlog. |
@kevin-carroll-cl, thank you for your report. |
Hi @sopedro Did you find any work around ? Thanks |
This issue was moved to magento-engcom/import-export-improvements#43 |
…-21-2024 [Support Tier-4-Kings glo28218] 03.21.2024 Regular delivery of bugfixes and improvements
Uh oh!
There was an error while loading. Please reload this page.
When importing customers into a site with a large number of existing customers through the standard Magento importer tool (System > Data Transfer > Import), with Entity Type: Customers Main File, and Import Behavior: Add/Update Complex Data, the import POST returns a 500 status caused by exceeding allowed memory limits.
Preconditions
Steps to reproduce
Expected result
Actual result
The memory use appears to be mainly triggered by framework level code (
\Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot::registerSnapshot
), and is likely platform independent.Through profiling and debugging we have found 2 very expensive processes that seem to be contributing to this. When beginning the customer import,
\Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::getCustomerId
is called, which triggers\Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\Storage::load
to execute which in turn executes\Magento\ImportExport\Model\ResourceModel\CollectionByPagesIterator::iterate
. Through this process every existing customer account is retrieved and loaded, which is a costly procedure to begin with, but then the email, website id and customer ids are loaded into a multidimensional array. Additionally, loading the customer array as part of the CollectByPagesIterator::iterate method, triggers snapshotting every customer and loading the whole entity data into another in memory array.Every existing customer is loaded and initialized as a full customer entity object, and data is held in multiple in-memory locations, in order to import a relatively small collection of new customers. This is an unsustainable practice, is costly in time, processing, and memory, and it is difficult to see the value in doing this.
The text was updated successfully, but these errors were encountered: