locked
Microsoft.Azure.Documents.DocumentClientException: Exception: Microsoft.Azure.Documents.RequestEntityTooLargeException, message: {"Errors":["Request size is too large"]}, request URI: rntbd://10.98.109.204:14900/apps/... RRS feed

  • Question

  • I have been using DocDB for a while, and all was going well.  All of a sudden it seems one of my JSON objects became "Too Large".  I have started receiving this error:

    System.AggregateException: One or more errors occurred. ---> Microsoft.Azure.Documents.DocumentClientException: Exception: Microsoft.Azure.Documents.RequestEntityTooLargeException, message: {"Errors":["Request size is too large"]}, request URI: rntbd://10.98.109.204:14900/apps/{random Guid}/services/{docDb Name}-ServerService-5/partitions/0/replicas/130642192952214098p
       at Microsoft.Azure.Documents.Client.ClientExtensions.<ParseResponseAsync>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at Microsoft.Azure.Documents.Client.GatewayProxy.<InvokeAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at Microsoft.Azure.Documents.Client.DocumentClient.<UpdateAsync>d__228.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at Microsoft.Azure.Documents.Client.DocumentClient.<ReplaceDocumentPrivateAsync>d__da.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at Microsoft.Azure.Documents.Client.DocumentClient.<ReplaceDocumentPrivateAsync>d__d2.MoveNext()
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
       at System.Threading.Tasks.Task`1.get_Result()
       at Icicle.Data.Domain.Azure.DocumentDBDomainRepository`2.Update(TModel entity)

    This happens when trying to update an ~100,000 byte json object.  I would think this shouldn't be a problem.  I was getting a similar error retrieving my object over WCF and i fixed it by adding basicHttpBinding configuration with maxReceivedMessageSize set to 2 GB (for test purposes).  Once i resolved my internal issues, i am now seeing what i was seeing from my own WCF services "Request size is too large" (i was seeing this as a (413) Request size is too large) from the DocumentDB API.

    Any thoughts on how i can configure the Microsoft.Azure.Documents.Client.DocumentClient to have a larger maxReceivedMessageSize or equivalent would be greatly appreciated.

       
    Monday, December 29, 2014 9:49 PM

Answers

  • Can you please post your DocumentDB endpoint, the activity ID of the request that failed with Request Entity Too Large? It would also help if you could send us the contents of the 100KB document and if possible a repro so we that we can replicate your exact setup. 

    If you don't want to post here, you can email me the details at arramac at microsoft dot com. 

    Tuesday, December 30, 2014 9:34 PM

All replies

  • Can you please post your DocumentDB endpoint, the activity ID of the request that failed with Request Entity Too Large? It would also help if you could send us the contents of the 100KB document and if possible a repro so we that we can replicate your exact setup. 

    If you don't want to post here, you can email me the details at arramac at microsoft dot com. 

    Tuesday, December 30, 2014 9:34 PM
  • same error here.. two years later. I am using Data Factory to import json file to CosmosDB. Any workaround?


    lucaszacutti

    Thursday, January 25, 2018 1:17 PM