cartridge-java
cartridge-java copied to clipboard
java.lang.IllegalArgumentException: newLimit > capacity: (15222917 > 1048576)
I caught this exception when bumped cartridge-driver from 0.7.2 to 0.14.0. We have around 180k entities in Tarantool. Each root entity User has maximum 6 inner entities as 1 to N or 1 to 1 relations. On 0.7.2 i don't have such ussues. My tarantool client configuration
@Bean
public TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> getTarantoolInstance() {
return io.tarantool.driver.api.TarantoolClientFactory.createClient()
.withAddresses(TARANTOOL_SERVER_HOSTS_FACTORY.getHosts(tarantoolConfiguration.getHosts(), TarantoolServerAddress::new, DEFAULT_TARANTOOL_PORT))
.withRequestTimeout(tarantoolConfiguration.getRequestTimeout().orElse(10000))
.withConnectTimeout(tarantoolConfiguration.getConnectTimeout().orElse(15000))
.withConnections(tarantoolConfiguration.getConnectionCount().orElse(4))
.withCredentials(tarantoolConfiguration.getUser().orElse(Strings.EMPTY), tarantoolConfiguration.getPassword().orElse(Strings.EMPTY)).build();
}
My function call :
private Map getAllUserInfoWithRoles(){
try {
return tarantoolClient
.callForSingleResult(
"get_all_users_optimization_with_roles",
List.of(),
Map.class)
.get();
} catch (Exception ex) {
throw new DaoRuntimeException("Exception has happened with get_all_users_optimization_with_roles ", ex);
}
}
io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: newLimit > capacity: (15222917 > 1048576)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:477)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
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(Unknown Source)
Caused by: java.lang.IllegalArgumentException: newLimit > capacity: (15222917 > 1048576)
at java.base/java.nio.Buffer.createLimitException(Unknown Source)
at java.base/java.nio.Buffer.limit(Unknown Source)
at java.base/java.nio.ByteBuffer.limit(Unknown Source)
at java.base/java.nio.MappedByteBuffer.limit(Unknown Source)
at java.base/java.nio.MappedByteBuffer.limit(Unknown Source)
at io.tarantool.driver.codecs.MessagePackFrameDecoder.decode(MessagePackFrameDecoder.java:51)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
2024-08-28 15:07:22.736 INFO [nioEventLoopGroup-2-1] [traceId = ] [spanId = ] i.t.d.c.c.AbstractTarantoolConnectionManager - Connected to Tarantool server at /my ip
2024-08-28 15:07:25.616 WARN [nioEventLoopGroup-2-1] [traceId = ] [spanId = ] i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.IllegalArgumentException: newLimit > capacity: (15222917 > 1048576)
at java.base/java.nio.Buffer.createLimitException(Buffer.java:372)
at java.base/java.nio.Buffer.limit(Buffer.java:346)
at java.base/java.nio.ByteBuffer.limit(ByteBuffer.java:1107)
at java.base/java.nio.MappedByteBuffer.limit(MappedByteBuffer.java:235)
at java.base/java.nio.MappedByteBuffer.limit(MappedByteBuffer.java:67)
at io.tarantool.driver.codecs.MessagePackFrameDecoder.decode(MessagePackFrameDecoder.java:51)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
... 21 common frames omitted
Wrapped by: io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: newLimit > capacity: (15222917 > 1048576)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:477)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
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:829)
Disconnected from the target VM, address: '127.0.0.1:62773', transport: 'socket'
Process finished with exit code -1