#migration stuck in state: 'inProgress'

1 messages · Page 1 of 1 (latest)

pale aspen
#

migration stuck in state: 'inProgress'

reef schoonerBOT
#

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:

  1. Check Migration Status and Progress
    You can query the live status of migrations using the CLI:

    npx convex run --component migrations lib:getStatus --watch
    

    This will show you the current state and progress of your migrations, and --watch will live-update as it changes. You can also get status programmatically using migrations.getStatus(ctx, ...) in your code Components: Migrations - Operations.

  2. Restart or Resume the Migration
    If a migration is stuck, you can try restarting it by passing null for 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.

  3. 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.

#
  1. 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.

  2. 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.

  3. 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.

Let me know if you need more specific troubleshooting steps!

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: