title: grpc: received message larger than max (8653851 vs. 4194304)
body: <p><strong>The problem</strong>: </p>
  
  <p>I am getting this error while receiving message in grpc: </p>
  
  <p><code>rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8653851 vs. 4194304)</code></p>
  
  <p><strong>What I tried:</strong></p>
  
  <p>I gave the option to increase the size of the message to be received but it still gave the same error which means this setting of maximum size didn't work: </p>
  
  <pre><code>size := 1024 * 1024 * 12
  opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(size)))
  conn, err := grpc.Dial(address, opts...)
  </code></pre>
  
  <p><strong>Comments:</strong></p>
  
  <p>The default limit is <code>1024 * 1024 * 4 = 4194304</code> which is shown in the error message. I was expecting this limit to increase to <code>1024 * 1024 * 12 = 12582912</code> but clearly it didn't.</p>