title: In Cosmos DB, is there a max size of documents you can send to a Stored Procedure?
body: <p>I'm getting a 'Request Size Too Large' Error in Cosmos.
  I'm sending, eventually, the following documents (each row should create a document) to my Bulk Import Stored Procedure: 
  <a href="https://i.stack.imgur.com/jjKkN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jjKkN.png" alt="Document File Sizes Calculated 2 Ways"></a></p>
  
  <p>None of these are over 2 MB unless I misunderstand 2MB to be somehow less than 1.5 million.</p>
  
  <p>Size Calc:</p>
  
  <pre><code>    var json = JsonConvert.SerializeObject(series);
      var sizeMethod1 = json.Length * sizeof(Char);
      var sizeMethod2 = System.Text.UTF8Encoding.Unicode.GetBytes(json).Length;
      log.Info($"Document Size Method 1: {sizeMethod1} and Size Method 2: {sizeMethod2}");
  </code></pre>
  
  <p>It's very challenging to debug the stored procedure when it throws an error.</p>