Fix Sitecore Payload 413 Errors in Site Search

You'll learn how to fix Sitecore indexing jobs that fail with a "413 Payload Too Large" error when sending data to SearchStax Site Search. This issue happens when the connector tries to send batches of documents that exceed the maximum request size.

Prerequisites

Before you start, you'll need:

  • Admin access to your Sitecore environment
  • Permission to edit App_Config or App_Data configuration files
  • A SearchStax Site Search App connected to your Sitecore instance

Adjust Batch Size Configuration

1. Update ContentBatch Size

In Sitecore, reduce the batch size settings so the module sends smaller requests:

  1. Open your Sitecore configuration files.
  2. Locate ContentSearch.IndexUpdate.BatchSize and ContentSearch.Update.BatchSize.
  3. Set both values to a smaller number, like 100.

2. Update the xDB Batch Size

If you use Sitecore xDB, you may also need to adjust the xDB indexer settings:

  1. Go to App_Data\jobs\continuous\IndexWorker\App_Data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexerSettings.xml.
  2. Find the <BatchSize> element.
  3. Set the value to 1000 or lower.
<BatchSize>1000</BatchSize>

3. Rebuild the Index

After making these changes:

  1. In Sitecore, open Control Panel > Indexing > Indexing Manager.
  2. Select your SiteStax index.
  3. Click Rebuild.

Click Preview in the top navigation bar in SearchStax to run a search. Confirm that Sitecore content indexes successfully and no "413 Payload Too Large" errors appear in the logs.

Notes

  • 10 MB limit: Site Search enforces a maximum payload size of 10 MB. If the total size of all documents in a batch exceeds this limit, the request fails with a 413 error and none of the items in that batch are indexed.
  • Large files: This issue is more common when indexing large media files, like PDFs.
  • Log check: Look for (413) Request Entity Too Large messages in your Sitecore logs or Application Insights to confirm the error.
  • System load caution: Lowering batch sizes reduces the chance of hitting the 10 MB limit but increases the number of commits from Sitecore to the search index. This can put extra load on CPU and memory. Monitor system health as you adjust values.

What's Next

If the error continues after lowering batch sizes, contact Support with your Sitecore version, Search App name, and current batch size configuration.

Articles in this section