4
比如 profiler生成比较大结果时就会出错。
2021-12-22 19:51:26 [arthas-ProxyClient-19-1] ERROR c.a.arthas.tunnel.client.ProxyClient -Proxy Client error
com.alibaba.arthas.deps.io.netty.handler.codec.TooLongFrameException: Response entity too large: DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
content-length: 10485760
content-type: application/octet-stream
date: Wed, 22 Dec 2021 11:51:26 GMT
expires: Wed, 22 Dec 2021 12:51:26 GMT
cache-control: private, max-age=3600
last-modified: Wed, 22 Dec 2021 11:51:02 GMT
at com.alibaba.arthas.deps.io.netty.handler.codec.http.HttpObjectAggregator.handleOversizedMessage(HttpObjectAggregator.java:276)
at com.alibaba.arthas.deps.io.netty.handler.codec.http.HttpObjectAggregator.handleOversizedMessage(HttpObjectAggregator.java:87)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageAggregator.invokeHandleOversizedMessage(MessageAggregator.java:404)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:254)
at com.alibaba.arthas.deps.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at com.alibaba.arthas.deps.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
主要是ProxyClient是一个简单的http client,并不是全功能的http proxy。
在代码里直接指定了最大包大小: ArthasConstants.MAX_HTTP_CONTENT_LENGTH