5

During index rebuild at Azure, I am getting error

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> Sitecore.ContentSearch.Azure.Http.Exceptions.RequestEntityTooLargeException: Request size exceeded Azure Search Service limits ---> Sitecore.ContentSearch.Azure.Http.Exceptions.AzureSearchServiceRESTCallException: The page was not displayed because the request entity is too large. --- End of inner exception stack trace --- at Sitecore.ContentSearch.Azure.Http.SearchServiceClient.EnsureSuccessStatusCode(HttpResponseMessage response)

Is it something that I could solve via Sitecore settings, or should be fixed on azure side?

  • on which index you get this error? – Vlad Iobagiu Feb 13 '18 at 19:25
  • I believe there is a limit on the indexing. I think I heard something about 100 or 1000 fields. Perhaps you can explore that. – Michael West Feb 13 '18 at 19:39
  • are you using same azure search service in dev and qa ? – Vlad Iobagiu Feb 13 '18 at 20:06
9

Issue was solved by decreasing batch size, for more info you can have a look onto:

https://docs.kentico.com/k11/configuring-kentico/setting-up-search-on-your-website/using-azure-search/customizing-azure-search .

This value can be set in Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config which is living under App_Config/Include. Node name cloudBatchBuilder, simply decrease the value maxDocuments.

The root of the problem was huge computed strings(crawled html) we tried to push in single batch. So we met a restriction of azure which is 16mb per batch. Regards.

1

There are limitations around what Azure Search can do on Sitecore. These are documented thoroughly on Sitecore's Documentation Site (Link to Doc Site Page).

That being said, RequestEntityTooLarge exception is caused because IIS is throwing a 413 Error Code. This is generally caused because of a WCF limitation which sets a default limit of 65KB for messages.

To Fix this, you need set maxReceivedMessageSize in your Web.config file in the system.serviceModel node.

<system.serviceModel>
  <bindings>
    <basicHttpBinding>
      <binding maxReceivedMessageSize="10485760">
        <readerQuotas ... />
      </binding>
    </basicHttpBinding>
  </bindings>  
</system.serviceModel> 
  • Which binding? Or do we add a binding? – Mark Gibbons Aug 24 '18 at 2:20
  • 1
    This is in the web.config file. I'm realizing it's not clear, so I will update the answer. – Pete Navarra Oct 25 '18 at 14:52
  • This may be wishful thinking, but shouldn't the default web config already have this in place? Why must we find out about this the hard way? – Marcel Feb 11 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.