I got an out of memory when deleting 1000s of nodes or comments
drush entity-delete node `drush entity-read node`
drush entity-delete comment `drush entity-read comment`
on Drupal 7.
We forgot to build a batch interface :-(
I got an out of memory when deleting 1000s of nodes or comments
drush entity-delete node `drush entity-read node`
drush entity-delete comment `drush entity-read comment`
on Drupal 7.
We forgot to build a batch interface :-(
Comments
Comment #1
juampynr commentedclemens.tolboom, this is weird. PHP's memory_limit variable is hardcoded to 0 at php.ini.
Comment #2
clemens.tolboom@juampy but the commands I gave contained prob 20K NIDs.
Drupal does a node_load_multiple(20K NIDs).
The numbers are not exactly but I ran out of memory (maybe 2GB)
(does that help?)
Comment #3
luksakTo me that happens with only one commerce product with a memory limit of 4GB...
Comment #4
clemens.tolboom@Lukas von Blarer please add more context? What is one commerce product? What was the exact command?
Comment #5
luksakIt was something like
drush entity-delete 1.My commerce products contain nested field collections and are quite big objects. But no reason to use 4GB of memory.
Comment #6
clemens.tolboom@Lukas von Blarer wow ... do you have some steps to reproduce?
Comment #7
luksakCould be hard to reproduce... My products contain nested field collections. This is my suspected reason for this. Could this somehow cause a infinite loop trying to delete these field collections inside the product?
Comment #8
adriancidComment #9
luksakWould you mind explaining why this is outdated? Has this been fixed? If not, this doesn't seem outdated to me.
Comment #10
adriancid@Lukas von Blarer, sorry for that. I thought it was resolved.
Comment #11
luksakI haven't tested it.
Comment #12
adriancid@Lukas von Blarer can you test again to see if the problem persist?
Comment #13
luksakI actually don't maintain the site anymore on which I faced this issue...
Comment #14
adriancid