Help topics

Lists say Getting this ready, or an index shows Failed

Symptoms

  • The collection screen shows the icon ⏳ and the title Getting this ready. The line under the title is the error message, for example idx book.status is building. A Try again button is shown.
  • The REST API responds with HTTP status 503, "code": "index_building" and "retry": true.
  • In the model editor, the Filters & search tab shows an index with the badge Building…. A failed index shows the badge Failed, the error text and a Retry button.
  • In Settings > General, the This installation card shows a row Background work. Each running or failed build appears there with its state. The row shows Idle when no build is running.

Cause

  • A build is still running after a model change. Morphic fills an index in the background after it changes. Reads that use the index return index_building until the build is done (src/Builder.php:62, src/Registry.php:163, assets/app/views/settings.js:35).
  • Background work runs when WordPress cron runs, when an administrator has the Morphic admin open, or during an import job. Morphic schedules the work on the morphic_work hook (src/Builder.php:85-88, morphic.php:72), and the admin app asks the server to run pending work (assets/app/main.js:267).
  • A build failed. Morphic stores the state failed with the error text (src/Builder.php:173, src/Builder.php:181).

Fix

If the status is Building… or Getting this ready

  1. Keep the Morphic admin open in a browser tab. While work is pending, the admin app asks the server to run it (assets/app/main.js:267).
  2. Select Try again on the collection screen.
  3. Open Settings > General. When Background work shows Idle, every build has finished.

If the status is Failed

  1. Select Models.
  2. Select the model.
  3. Select the Filters & search tab.
  4. Read the error text next to Failed.
  5. Fix the cause that the error text names.
  6. Select Retry. Morphic shows the message Rebuilding. The index shows Building… until the build finishes. Morphic clears the index and fills it again (src/Builder.php:74, assets/app/views/models.js:622).

Only an administrator can retry a build (src/Rest.php:209).

Still not working?

Collect the following before you ask for help:

  • The error text, which names the index kind, the model and the index, for example idx book.status is building.
  • The full error text under Getting this ready or next to Failed.
  • The Background work row in Settings > General, with the state it shows.
  • The version of the Morphic row in the This installation card.

Contact us through the contact form with your Morphic version and the exact error text.