Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json serialization is blocking event-loop for too long #188

Open
hiddenalpha opened this issue May 28, 2024 · 0 comments
Open

Json serialization is blocking event-loop for too long #188

hiddenalpha opened this issue May 28, 2024 · 0 comments
Labels

Comments

@hiddenalpha
Copy link
Member

Serializing larger JSONs on the event-loop is becoming an issue.

2024-05-28T12:03:52,860 test houston WARN BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-2,5,main] has been blocked for 82 ms, time limit is 8 ms
io.vertx.core.VertxException: Thread blocked
	at com.fasterxml.jackson.core.util.TextBuffer.contentsAsString(TextBuffer.java:465) ~[jackson-core-2.13.0.jar:2.13.0]
	at com.fasterxml.jackson.core.io.SegmentedStringWriter.getAndClear(SegmentedStringWriter.java:85) ~[jackson-core-2.13.0.jar:2.13.0]
	at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3828) ~[jackson-databind-2.13.0.jar:2.13.0]
	at io.vertx.core.json.jackson.DatabindCodec.toString(DatabindCodec.java:161) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.json.JsonObject.encode(JsonObject.java:1034) ~[vertx-core-4.5.1.jar:4.5.1]
	at org.swisspush.reststorage.redis.RedisStorage$StorageExpand.lambda$exec$1(RedisStorage.java:711) ~[rest-storage-3.1.1.jar:?]
	at org.swisspush.reststorage.redis.RedisStorage$StorageExpand$$Lambda$2789/0x0000000840a66040.handle(Unknown Source) ~[?:?]
	at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:246) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.Transformation$1.onSuccess(Transformation.java:63) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:231) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.Transformation.onSuccess(Transformation.java:44) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:60) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureBase$$Lambda$1491/0x00000008405d7840.run(Unknown Source) ~[?:?]
	at io.vertx.core.impl.ContextImpl.execute(ContextImpl.java:305) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.DuplicatedContext.execute(DuplicatedContext.java:181) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:57) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:246) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.redis.client.impl.RedisStandaloneConnection.handle(RedisStandaloneConnection.java:418) ~[vertx-redis-client-4.5.1.jar:4.5.1]
	at io.vertx.redis.client.impl.RESPParser.handleResponse(RESPParser.java:316) ~[vertx-redis-client-4.5.1.jar:4.5.1]
	at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:128) ~[vertx-redis-client-4.5.1.jar:4.5.1]
	at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:24) ~[vertx-redis-client-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.NetSocketImpl.lambda$new$1(NetSocketImpl.java:101) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.NetSocketImpl$$Lambda$1590/0x00000008406b8840.handle(Unknown Source) ~[?:?]
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:255) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:134) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:402) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:335) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:328) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:378) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:159) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153) ~[vertx-core-4.5.1.jar:4.5.1]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.103.Final.jar:4.1.103.Final]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]
hiddenalpha added a commit to hiddenalpha/gateleen that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant