Pavel Tupitsyn created IGNITE-25985:
---------------------------------------

             Summary: Thin 3.0: Server drops connection when request is too 
large
                 Key: IGNITE-25985
                 URL: https://issues.apache.org/jira/browse/IGNITE-25985
             Project: Ignite
          Issue Type: Bug
          Components: platforms ai3, thin clients ai3
            Reporter: Pavel Tupitsyn
            Assignee: Pavel Tupitsyn
             Fix For: 3.1


If a request is too large (over ~1 GiB), server drops the connection and logs 
an exception:

{code}
io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 457179136 
byte(s) of direct memory (used: 620756992, max: 1073741824)
        at 
io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:862)
        at 
io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:791)
        at 
io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:718)
        at 
io.netty.buffer.PoolArena$DirectArena.newUnpooledChunk(PoolArena.java:707)
        at io.netty.buffer.PoolArena.allocateHuge(PoolArena.java:224)
        at io.netty.buffer.PoolArena.allocate(PoolArena.java:142)
        at io.netty.buffer.PoolArena.reallocate(PoolArena.java:317)
        at io.netty.buffer.PooledByteBuf.capacity(PooledByteBuf.java:123)
        at 
io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:305)
        at 
io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:280)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1103)
        at io.netty.buffer.WrappedByteBuf.writeBytes(WrappedByteBuf.java:792)
        at 
io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:606)
        at 
io.netty.handler.codec.ByteToMessageDecoder$1.cumulate(ByteToMessageDecoder.java:105)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:288)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:840)
{code}

* Consider increasing *io.netty.maxDirectMemory*
* Consider returning an error to the client



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to