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_buildinguntil 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_workhook (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
- 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). - Select Try again on the collection screen.
- Open Settings > General. When Background work shows Idle, every build has finished.
If the status is Failed
- Select Models.
- Select the model.
- Select the Filters & search tab.
- Read the error text next to Failed.
- Fix the cause that the error text names.
- 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.