If indexing fails with an error like Could not index item because its size exceeded SearchStax server's maximum request size, the problem might be a timeout or batch-size issue rather than a large document.
This can happen even when your documents are relatively small.
Check Document Size
Verify the actual document size first. If the documents are smaller than 1 MB, size is probably not the cause of the failure.
Look for Timeout Errors
Check your logs for errors such as HTTP request failed or Operation timed out after X milliseconds.
Indexing may also appear slow, intermittent, or limited to one environment, such as Stage, while another environment, such as Dev, keeps working.
Reduce Batch Size
Temporarily set the batch size to 1 to see whether batching is contributing to the failure. This can help isolate whether Drupal is sending too many items at once.
Increase Indexing Timeout
Increasing the indexing timeout from 15 seconds to 30 seconds can allow all documents to index successfully.
If you're migrating from Acquia Search or another search solution, review timeout settings, batch sizes, and logs during the initial indexing run.
Next Steps
- See Drupal Module for broader module setup and behavior.