Hi All/Oleg,

Greetings everyone! I trust you are all doing well. We've been utilizing
httpcore5-h2 (version 5.2.2), and unfortunately, we encountered an issue in
our production environment yesterday. Upon investigation of the library
code, it appears that the problem lies within the library.

The Issue: HTTP calls to send a file larger than 16KB are failing due to an
error stating, "Frame size exceeds maximum."

Background: Our server is accessed behind an Application Load Balancer
(ALB). We previously faced an issue where the frame size was set to 16MB,
as dictated by the remote configuration, leading to memory problems. This
particular issue was addressed in a previous resolution:
https://issues.apache.org/jira/browse/HTTPCORE-751. In that resolution, we
agreed to use a smaller frame size, expecting that the server would not
send frames larger than the specified size.

I believe that the current issue may be a regression resulting from the
changes implemented in https://issues.apache.org/jira/browse/HTTPCORE-751.

[image: image.png]

if you look at the code highlighted above in AbstractH2StreamMultiplexer
class, it should be

final int maxPayloadSize = Math.min(capacity, localConfig.getMaxFrameSize());

because we have set it value between the minimum of both server and
local config otherwise payload can exceed the outBuffer size which is
happening in our case.


Traces Of the issues:

java.lang.IllegalArgumentException: Frame size exceeds maximum
        at org.apache.hc.core5.util.Args.check(Args.java:41)
        at 
org.apache.hc.core5.http2.impl.nio.FrameOutputBuffer.write(FrameOutputBuffer.java:98)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.streamDataFrame(AbstractH2StreamMultiplexer.java:340)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.streamData(AbstractH2StreamMultiplexer.java:361)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.access$1300(AbstractH2StreamMultiplexer.java:92)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer$H2StreamChannelImpl.write(AbstractH2StreamMultiplexer.java:1709)
        at 
org.apache.hc.core5.http2.impl.nio.ClientH2StreamHandler$1.write(ClientH2StreamHandler.java:92)
        at 
org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec$1$1.write(HttpAsyncMainClientExec.java:172)
        at 
org.apache.hc.core5.http.nio.entity.BasicAsyncEntityProducer.produce(BasicAsyncEntityProducer.java:129)
        at 
org.apache.hc.core5.http.nio.support.BasicRequestProducer.produce(BasicRequestProducer.java:104)
        at 
com.iontrading.treasuryportal.core.bindingshelper.producers.TARequestProducer.produce(TARequestProducer.java:52)
        at 
org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient$2.produce(InternalAbstractHttpAsyncClient.java:260)
        at 
org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec$1.produce(HttpAsyncMainClientExec.java:163)
        at 
org.apache.hc.core5.http2.impl.nio.ClientH2StreamHandler.produceOutput(ClientH2StreamHandler.java:172)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer$H2Stream.produceOutput(AbstractH2StreamMultiplexer.java:1539)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.produceOutput(AbstractH2StreamMultiplexer.java:1266)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.onOutput(AbstractH2StreamMultiplexer.java:474)
        at 
org.apache.hc.core5.http2.impl.nio.AbstractH2IOEventHandler.outputReady(AbstractH2IOEventHandler.java:74)
        at 
org.apache.hc.core5.http2.impl.nio.ClientH2IOEventHandler.outputReady(ClientH2IOEventHandler.java:39)

Thanks,

Sandeep Gaur

Reply via email to