#migration stuck in state: 'inProgress'
1 messages · Page 1 of 1 (latest)
Hi @pale aspen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
If your Convex migration is stuck in the state 'inProgress', here are some steps and considerations based on the knowledge sources:
-
Check Migration Status and Progress
You can query the live status of migrations using the CLI:npx convex run --component migrations lib:getStatus --watchThis will show you the current state and progress of your migrations, and
--watchwill live-update as it changes. You can also get status programmatically usingmigrations.getStatus(ctx, ...)in your code Components: Migrations - Operations. -
Restart or Resume the Migration
If a migration is stuck, you can try restarting it by passingnullfor the cursor:npx convex run migrations:runIt '{cursor: null}'This will force the migration to start over. Alternatively, you can resume from a specific cursor if you have one from a previous status call Components: Migrations - Operations.
-
Stop or Cancel the Migration
If you need to stop a migration, you can do so from the CLI:npx convex run --component migrations lib:cancel '{name: "migrations:myMigration"}'Or programmatically:
await migrations.cancel(ctx, internal.migrations.myMigration);This can be useful if the migration is not progressing and you want to halt it before retrying or debugging Components: Migrations - Operations.
-
Behavior of Serial Migrations
If you are running migrations serially, note that if a migration fails or is canceled, subsequent migrations in the series will not continue. You will need to call the series again to retry. If a migration is already in progress, new attempts will no-op Components: Migrations - Running migrations serially. -
Check for Partial Progress or Errors
If a migration had partial progress, it should resume from where it left off. If it is stuck, there may be an error in the migration code or an issue with the data being processed. Review your migration logic and logs for any errors. -
Dashboard and CLI Tools
You can also manage migrations from the Convex dashboard, including stopping, restarting, or confirming actions if the CLI is not responsive.
If after these steps your migration remains stuck in 'inProgress', there may be a deeper issue (such as a bug in the migration code, a data conflict, or a system problem). In such cases, reviewing logs, simplifying the migration, or reaching out to Convex support may be necessary.
If you have a Pro subscription, you can open a support ticket via the dashboard for more direct assistance Discord: Deployment Frozen after Aggregations clearing.