- Issue created by @fjgarlin
- Status changed to Fixed
6 months ago 3:23pm 12 June 2024 - 🇪🇸Spain fjgarlin
After some very good and useful back and forth, I raised the memory a bit and also excluded all the migrations that are not provided by our module: https://git.drupalcode.org/project/drupalorg_migrate/-/blob/1.0.x/drupal...
Note that Drupal Core and the modules in the project would bring +600 migrations: https://www.drupal.org/files/issues/2024-06-12/drupal-default-migrations... →
Also suggested in the thread to create an event subscriber to control the static cache memory used in the migrations, which I'll be implementing as well.
Thanks all who helped me in the thread.
- 🇪🇸Spain fjgarlin
After a few million records imported, the script would run out of memory again. I tried the Event subscriber approach, which should have worked, but it didn't. The memory was freed.
I ended up batching results and using a script mentioned here https://chromatichq.com/insights/migration-memory-management-batching-an... to run the migrations in batches.
You can see the commit here: https://git.drupalcode.org/project/drupalorg_migrate/-/commit/675ecd9673...
Automatically closed - issue fixed for 2 weeks with no activity.