title: Netty large POJO transfer error: TooLongFrameException
body: <p>I have a netty pipeline such as:</p>
  
  <pre><code>            return Channels.pipeline(
                      new ObjectEncoder(),
                      new ObjectDecoder(),
                      new MyCustomCommandServerHandler());
  </code></pre>
  
  <p>For both the client and server where:</p>
  
  <pre><code>MyCustomCommandServerHandler extends SimpleChannelUpstreamHandler
  </code></pre>
  
  <p>The error I'm getting is that the POJO I'm trying to send back from the server to the client is too large and results in the following error:</p>
  
  <p><strong>org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 1048576: 1816357 - discarded</strong></p>
  
  <p>How do I adjust the ObjectEncoder/Decoder to take larger sized POJO objects?</p>