HTTP content length exceeded 16777216 bytes
johje349 opened this issue · comments
I am using Swift and setting up a thrift client using Nifty HttpClientConnector in the following way.
HttpClientConnector connector = new HttpClientConnector(URI.create("http://xxxxx:8181/trackerservice"));
ThriftClientManager clientManager = new ThriftClientManager(new ThriftCodecManager());
thriftClient = clientManager.createClient(connector, TrackerService.class).get();
When calling remote procedures which returns a large result set I get an exception:
org.apache.thrift.transport.TTransportException: org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 16777216 bytes
How can I change max frame size on my connection?
u can use ThriftServerDef limit your frame size,simple code like this:
ThriftServerDef serverDef = ThriftServerDef.newBuilder() .listen(port) .withProcessor(processor) .using(taskWorkerExecutor) .limitFrameSizeTo(67108864*5) .build();
best wishes!