Using drush 7.x-5.9 (latest).
When using drush solr-index with apachesolr 6.x-3.0-rc1 the script eventually runs out of memory. (Could not try this on 6.x-dev due to #1983724: Reindexing/initial indexing does not work in latest 6.x-3.x),

Inspected 3100 of 7464 entities. Submitted 3100 documents to Solr                                                        [ok]
Inspected 3150 of 7464 entities. Submitted 3150 documents to Solr                                                        [ok]
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /opt/drush/includes/backend.inc on line 251
Drush command terminated abnormally due to an unrecoverable error.                                                       [error]
Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /opt/drush/includes/backend.inc,
line 251

This is probably because in the latest apachesolr 6.x-3.0 implementation, drush does not stop indexing after processing apachesolr_cron_limit items. Instead, it queues another batch in an attempt to finish all left items. (great feature improvement BTW)
When using --debug with drush, I can see the memory footprint steadily increasing, this tells me it is due to a memory leak somewhere in the batch processor for apachesolr, or drush itself. I can see the same memory consumption pattern with a 6.x-1.8 module too, although in that case the processing stops after the cron limit of 200, so I never run out of memory.

In the interim my workaround is to do for i in {1..10}; do drush solr-index; done;

Comments

rares’s picture

Also reported by iTiZZiMO in #1409470: Some Errors in dev Version from 18th January comment 2.