title: Limits for codecs in spring
body: <p>I was getting following exception while using Web Client.</p>
  <pre><code>org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144
  </code></pre>
  <p>which indicated that codec limit has to be increased via <em><strong><a href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/codec/CodecConfigurer.DefaultCodecs.html#maxInMemorySize-int-" rel="nofollow noreferrer">MaxInMemorySize</a></strong></em> property.</p>
  <p>I wanted to understand if MaxInMemorySize is set to X, does that mean for every request our application puts aside X amount of memory for buffering upfront or that the memory is assigned dynamically as per the response size of each request.</p>