5

I created a migration with a query that seems to have broken my migration. I added two groupBy on a query, instead of two orderBys. As a result, running drush mi MyMigration got stuck in what appeared to be an endless loop.

I CTRL-C'd the process and then ran a drush mst --all, but now the status is reporting as "Stopping" in the UI, and the drush ms command does not return.

I tried stoping and restarting MAMP, but to no effect.

Is there someway to force my migration to get unstuck?

1
  • There are many "migration" modules, please tell us exactly what you are using and how it is configured.
    – Mołot
    Oct 21, 2014 at 21:22

2 Answers 2

8

Did you try migrate-reset-status, and possibly with --force: https://www.drupal.org/node/1561820

Otherwise I typically restart PHP manually once (restart your webserver) and then use Drush to rollback all the migrations to try again fresh.

EDIT

I rarely use the UI as everything is usable and scriptable via drush when using Migrate. And trying to use a webserver to check the status of long-running tasks can be error-prone.

2
  • I tried migrate-reset-status. It did allow me to rollback the migration - or at least appears to have. However, I still cannot get the status (drush ms status), and the UI shows that the migration is still stopping. I also restarted MAMP - and my desktop afterwards, to no affect. Not sure how to flush this state?
    – Tim
    Oct 22, 2014 at 12:24
  • Try migrate-register. Again drush help migrate-register to see what it does. I recommend reading about every migrate command over a coffee: drush help --filter=migrate and then read the drush help COMMAND per command.
    – tenken
    Oct 22, 2014 at 12:33
4

This worked for me:

drush php-eval "var_dump(Drupal::keyValue('migrate_status')->set('migration_id', 0));"
1
  • I'm unlucky, hasn't worked for me yet: set('migration_id', 0));" bash: -c: line 1: syntax error near unexpected token (' bash: -c: line 1: set -eu && ( /mnt/ddev_config/.global_commands/web/drush php-eval var_dump(Drupal::keyValue('migrate_status')->set('migration_id', 0));)' Mar 10 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.